Browse Source

fixed 3 files out of 2793:

- removed 58 CR characters
 - removed 8 trailing whitespaces
 - replaced 2 tabs with spaces
 - fixed 1 svn:eol-style properties
undefined
Lolbot Sam Hocevar <sam@hocevar.net> 11 years ago
parent
commit
16cbaaa1a3
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/camera.cpp

+ 2
- 2
src/camera.cpp View File

@@ -224,13 +224,13 @@ quat Camera::GetRotation()
// Calculate the frustum height at a given distance from the camera. // Calculate the frustum height at a given distance from the camera.
float Camera::GetFrustumHeightAtDistance(float distance, float fov) float Camera::GetFrustumHeightAtDistance(float distance, float fov)
{ {
return 2.f * distance * lol::tan(fov * .5f * (F_PI / 180.f));
return 2.f * distance * lol::tan(fov * .5f * (F_PI / 180.f));
} }


// Calculate the FOV needed to get a given frustum height at a given distance. // Calculate the FOV needed to get a given frustum height at a given distance.
float Camera::GetFOVForHeightAndDistance(float distance, float height) float Camera::GetFOVForHeightAndDistance(float distance, float height)
{ {
return 2.f * lol::atan(height * .5f / distance) * (180.f / F_PI);
return 2.f * lol::atan(height * .5f / distance) * (180.f / F_PI);
} }


void Camera::TickGame(float seconds) void Camera::TickGame(float seconds)


Loading…
Cancel
Save