Skip to content

Commit

Permalink
start/stop - begin/end
Browse files Browse the repository at this point in the history
  • Loading branch information
rktrlng committed Nov 15, 2019
1 parent 8a2c974 commit cf795ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions projects/raycast/myscene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void MyScene::update(float deltaTime)
int y1 = std::rand() % SHEIGHT;
int x2 = std::rand() % SWIDTH;
int y2 = std::rand() % SHEIGHT;
walls[i].start = Point2(x1, y1);
walls[i].begin = Point2(x1, y1);
walls[i].end = Point2(x2, y2);
}
robot = Robot(SWIDTH/2, SHEIGHT/2);
Expand Down Expand Up @@ -87,7 +87,7 @@ void MyScene::update(float deltaTime)
}

void MyScene::draw(Boundary& wall) {
ddLine(wall.start, wall.end, RED);
ddLine(wall.begin, wall.end, RED);
}

void MyScene::draw(Ray& ray) {
Expand Down
8 changes: 4 additions & 4 deletions projects/raycast/raycast.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
#include <rt2d/vectorx.h> // Point2 + Vector2

struct Boundary {
Point2 start;
Point2 begin;
Point2 end;
Boundary(float x1, float y1, float x2, float y2) {
this->start = Vector2(x1, y1);
this->begin = Vector2(x1, y1);
this->end = Vector2(x2, y2);
}
};
Expand All @@ -38,8 +38,8 @@ struct Ray {
}

Point2 cast(Boundary& wall) {
float x1 = wall.start.x;
float y1 = wall.start.y;
float x1 = wall.begin.x;
float y1 = wall.begin.y;
float x2 = wall.end.x;
float y2 = wall.end.y;

Expand Down

0 comments on commit cf795ee

Please sign in to comment.