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)); }
public float GetDistance(Vector position) { return(Math.Max(Object1.GetDistance(position), -Object2.GetDistance(position))); }