Advertisement
Silverlan

Untitled

Oct 24th, 2012
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.22 KB | None | 0 0
  1. local pi = math.deg(math.pi)
  2. local function CalculateRealFov(fov,aspectRatio)
  3.     return (math.atan(math.tan((fov *pi) /360) *(aspectRatio /(4 /3))) *360) /pi
  4. end
  5. local fov = 70
  6. fov = CalculateRealFov(fov,ScrW() /ScrH())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement