Replies: 1 comment
-
Vector2LineAngle and Vector2Angle are producing the same result like in raylib C. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have been doing some simple visualization while trying to re-learn linear algebra. While doing so I was trying to show the angle from the center of the screen to the mouse position .
I was passing normalized vectors based on the comment here:
angle := rl.Vector2LineAngle(rl.Vector2Normalize(mid), rl.Vector2Normalize(mouse))
Since that did not give me the value I was expecting I updated my code to use
Vector2Angle
but missed updating the method so had:angle := rl.Vector2LineAngle(mid, mouse)
The above call does not use normalized vectors but give me the correct degree.
Here is the simple code I put together:
Curious too how to use
Vector2Angle
the degree never seems to match what I expect with the actual vector or the normalized.Beta Was this translation helpful? Give feedback.
All reactions