Review spacing formatting
raylib uses spaces between '+' and '-' signs but not between '*' and '/' signs, it's a chosen convention
This commit is contained in:
parent
173f199313
commit
7f0880a735
7 changed files with 99 additions and 91 deletions
|
@ -1016,7 +1016,7 @@ Vector2 GetWorldToScreen(Vector3 position, Camera camera)
|
|||
QuaternionTransform(&worldPos, matProj);
|
||||
|
||||
// Calculate normalized device coordinates (inverted y)
|
||||
Vector3 ndcPos = { worldPos.x / worldPos.w, -worldPos.y / worldPos.w, worldPos.z / worldPos.z };
|
||||
Vector3 ndcPos = { worldPos.x/worldPos.w, -worldPos.y/worldPos.w, worldPos.z/worldPos.z };
|
||||
|
||||
// Calculate 2d screen position vector
|
||||
Vector2 screenPosition = { (ndcPos.x + 1.0f)/2.0f*(float)GetScreenWidth(), (ndcPos.y + 1.0f)/2.0f*(float)GetScreenHeight() };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue