예제 #1
0
 public float GetDistance(Vector position)
 {
     if (X.HasValue)
     {
         position.x = Math.Abs(position.x) % X.Value;
     }
     if (Y.HasValue)
     {
         position.y = Math.Abs(position.y) % Y.Value;
     }
     if (Z.HasValue)
     {
         position.z = Math.Abs(position.z) % Z.Value;
     }
     return(Object.GetDistance(position));
 }
예제 #2
0
 public float GetDistance(Vector position)
 {
     return(Math.Max(Object1.GetDistance(position), -Object2.GetDistance(position)));
 }