pub fn transform(self, transform: GridMatrix) -> Option<Self> {
        let mut p1 = transform.transform_point(self.lower_bounds());
        let mut p2 = transform.transform_point(self.upper_bounds());

        // Swap coordinates in case of rotation or reflection.
        for axis in 0..3 {
            if p1[axis] > p2[axis] {
                std::mem::swap(&mut p1[axis], &mut p2[axis]);
            }
        }
        Some(Self::from_lower_upper(p1, p2))
    }
/// Transforms the grid.
///
/// Caution: The results are undefined if the matrix mixes axes
/// rather than only swapping and scaling them.
/// TODO: Find the proper mathematical concept to explain that.
/// TODO: Check and error in that case.
///
/// TODO: Fail nicely on numeric overflow.
/// The `Option` return is not currently used.
Transforms the grid.
Caution: The results are undefined if the matrix mixes axes
rather than only swapping and scaling them.
TODO: Find the proper mathematical concept to explain that.
TODO: Check and error in that case.

Fail nicely on numeric overflow.
The `Option` return is not currently used.
Transforms the grid . Caution : The results are undefined if the matrix mixes axes rather than only swapping and scaling them . TODO : Find the proper mathematical concept to explain that . TODO : Check and error in that case . Fail nicely on numeric overflow . The ` Option ` return is not currently used .
pub fn transform(self, transform: GridMatrix) -> Option<Self> {
        let mut p1 = transform.transform_point(self.lower_bounds());
        let mut p2 = transform.transform_point(self.upper_bounds());
        // Swap coordinates in case of rotation or reflection.
        for axis in 0..3 {
            if p1[axis] > p2[axis] {
                std::mem::swap(&mut p1[axis], &mut p2[axis]);
            }
        }
        Some(Self::from_lower_upper(p1, p2))
    }
pub fn transform ( self , transform : GridMatrix ) -> Option < Self > { let mut p1 = transform . transform_point ( self . lower_bounds ( ) ) ; let mut p2 = transform . transform_point ( self . upper_bounds ( ) ) ; // Swap coordinates in case of rotation or reflection. for axis in 0 .. 3 { if p1 [ axis ] > p2 [ axis ] { std :: mem :: swap ( & mut p1 [ axis ] , & mut p2 [ axis ] ) ; } } Some ( Self :: from_lower_upper ( p1 , p2 ) ) }
Transforms the grid.
Transforms the grid .
self
transform
GridMatrix