Ejemplo n.º 1
0
 public static FaceOrientation OrientationFromPhi(float phi)
 {
     phi = FezMath.WrapAngle(phi);
     if (FezMath.AlmostEqual(phi, 0.0f))
     {
         return(FaceOrientation.Front);
     }
     if (FezMath.AlmostEqual(phi, 1.570796f))
     {
         return(FaceOrientation.Right);
     }
     if (FezMath.AlmostEqual(phi, -3.141593f))
     {
         return(FaceOrientation.Back);
     }
     if (FezMath.AlmostEqual(phi, -1.570796f))
     {
         return(FaceOrientation.Left);
     }
     else
     {
         return(FezMath.OrientationFromPhi(FezMath.SnapPhi(phi)));
     }
 }