Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,15 @@ static float[] generateDragonCurve(int width, int height, int recursions){
Vector2 head = new Vector2(width/2, height/2);
Vector2 heading = new Vector2(5, 0);

float[] curve = new float[(turns.size() + 1) * 2];
float[] curve = new float[(turns.size() + 2) * 2];

int i = 0;
curve[i++] = head.x;
curve[i++] = head.y;
head.x += heading.x;
head.y += heading.y;
curve[i++] = head.x;
curve[i++] = head.y;

//TODO: Convert the list of turns into the actual path
for (Direction turn : turns){
Expand Down