Exemple #1
0
 public static float Angle(Vector3 from, Vector3 to)
 {
     return((float)Math.Acos(MineNETMath.Clamp(Dot(from.Normalized, to.Normalized), -1f, 1f)) * 57.29578f);
 }
Exemple #2
0
 public static Vector3 Lerp(Vector3 a, Vector3 b, float t)
 {
     t = MineNETMath.ClampZeroOne(t);
     return(new Vector3(a.X + (b.X - a.X) * t, a.Y + (b.Y - a.Y) * t, a.Z + (b.Z - a.Z) * t));
 }
Exemple #3
0
 public static Vector2 Lerp(Vector2 a, Vector2 b, float t)
 {
     t = MineNETMath.ClampZeroOne(t);
     return(new Vector2(a.X + (b.X - a.X) * t, a.Y + (b.Y - a.Y) * t));
 }