Пример #1
0
 public bool Contains(Boxi box)
 {
     return(!(box.min.x < min.x || box.min.y < min.y || box.min.z < min.z || box.max.x > max.x || box.max.y > max.y || box.max.z > max.z));
 }
Пример #2
0
 public static Vector3Int Clamp(this Vector3Int v, Boxi box)
 {
     return(new Vector3Int((v.x < box.min.x) ? box.min.x : ((v.x > box.max.x) ? box.max.x : v.x), (v.y < box.min.y) ? box.min.y : ((v.y > box.max.y) ? box.max.y : v.y), (v.z < box.min.z) ? box.min.z : ((v.z > box.max.z) ? box.max.z : v.z)));
 }