Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void NormalizeVector(Vector& v)
- {
- if (v.x > 89.0f && v.x <= 180.0f)
- v.x = 89.0f;
- while (v.x > 180.f)
- v.x -= 360.f;
- while (v.x < -89.0f)
- v.x = -89.0f;
- while (v.y > 180.f)
- v.y -= 360.f;
- while (v.y < -180.f)
- v.y += 360.f;
- v.z = 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement