|
|
@ -85,3 +85,11 @@ overload!((l: ?BlockRegion) + (r: IVec3) -> BlockRegion { BlockRegion::new_unche |
|
|
|
overload!((l: ?BlockRegion) - (r: IVec3) -> BlockRegion { BlockRegion::new_unchecked(l.min - r, l.max - r) }); |
|
|
|
overload!((l: ?BlockRegion) - (r: IVec3) -> BlockRegion { BlockRegion::new_unchecked(l.min - r, l.max - r) }); |
|
|
|
overload!((s: &mut BlockRegion) += (v: IVec3) { s.min += v; s.max += v; }); |
|
|
|
overload!((s: &mut BlockRegion) += (v: IVec3) { s.min += v; s.max += v; }); |
|
|
|
overload!((s: &mut BlockRegion) -= (v: IVec3) { s.min -= v; s.max -= v; }); |
|
|
|
overload!((s: &mut BlockRegion) -= (v: IVec3) { s.min -= v; s.max -= v; }); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Conversion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
impl From<BlockRegion> for (BlockPos, BlockPos) { |
|
|
|
|
|
|
|
fn from(BlockRegion { min, max }: BlockRegion) -> Self { |
|
|
|
|
|
|
|
(min, max) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|