Skip to content

Commit

Permalink
fixed SetDirection functions that were setting position
Browse files Browse the repository at this point in the history
  • Loading branch information
LiamOS committed Oct 22, 2024
1 parent 9ad15ee commit c8a92cd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/TMS_Track.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ void TMS_Track::SetStartDirection(double ax, double ay, double az)
{
double mag = ax*ax + ay*ay + az*az;

Start[0] = ax/mag;
Start[1] = ay/mag;
Start[2] = az/mag;
StartDirection[0] = ax/mag;
StartDirection[1] = ay/mag;
StartDirection[2] = az/mag;
};

// Set the end direction of the track object, normalised so magnitude == 1
void TMS_Track::SetEndDirection(double ax, double ay, double az)
{
double mag = ax*ax + ay*ay + az*az;

End[0] = ax/mag;
End[1] = ay/mag;
End[2] = az/mag;
EndDirection[0] = ax/mag;
EndDirection[1] = ay/mag;
EndDirection[2] = az/mag;
};

0 comments on commit c8a92cd

Please sign in to comment.