diff --git a/src/DotRecast.Recast.Demo/Draw/GLU.cs b/src/DotRecast.Recast.Demo/Draw/GLU.cs index 8ea91d8..e1d5b5d 100644 --- a/src/DotRecast.Recast.Demo/Draw/GLU.cs +++ b/src/DotRecast.Recast.Demo/Draw/GLU.cs @@ -35,7 +35,7 @@ public static class GLU public static void GlhPerspectivef2(ref RcMatrix4x4f matrix, float fovyInDegrees, float aspectRatio, float znear, float zfar) { float ymax, xmax; - ymax = (float)(znear * Math.Tan(fovyInDegrees * MathF.PI / 360.0)); + ymax = znear * MathF.Tan(fovyInDegrees * MathF.PI / 360); xmax = ymax * aspectRatio; GlhFrustumf2(ref matrix, -xmax, xmax, -ymax, ymax, znear, zfar); }