示例#1
0
 public Pos(Pos p)
 {
     Set(p.X, p.Y, p.Z);
 }
示例#2
0
 public static float Dot(Pos a, Pos b)
 {
     return(a.X * b.X + a.Y * b.Y + a.Z * b.Z);
 }
示例#3
0
 public static Pos Avg(Pos a, Pos b)
 {
     return((a + b) * 0.5f);
 }
示例#4
0
 public static float Dist(Pos a, Pos b)
 {
     return((float)Math.Sqrt(Math.Pow((b.X - a.X), 2) + Math.Pow((b.Y - a.Y), 2) + Math.Pow((b.Z - a.Z), 2)));
 }
示例#5
0
 public static Pos Max(Pos a, Pos b)
 {
     return(new Pos(Math.Max(a.X, b.X), Math.Max(a.Y, b.Y), Math.Max(a.Z, b.Z)));
 }