pub fn cofactor(&self, y: usize, x: usize) -> f64 {
        let minor = self.minor(y, x);

        // The data type is irrelevant here, as long as it supports bit shifts (float doesn't).
        // usize is used for convenience on the next operation.
        //
        let minor_bits = minor.to_bits();

        // This is (0 for even/1 for odd), shifted to be the leftmost bit, so that it's in the sign position
        // of f64 values.
        //
        let sign_bits = ((x + y) << 63) as u64;

        // Xor keeps the <destination sign> if the <sign operand> is 0, and changes it, if the <sign operand> is 1.
        //
        f64::from_bits(minor_bits ^ sign_bits)
    }
// Mad lulz here. Note that for portability, the bit shift should change depending on the arch.
//
Mad lulz here. Note that for portability, the bit shift should change depending on the arch.
Mad lulz here . Note that for portability the bit shift should change depending on the arch .
pub fn cofactor(&self, y: usize, x: usize) -> f64 {
        let minor = self.minor(y, x);
        // The data type is irrelevant here, as long as it supports bit shifts (float doesn't).
        // usize is used for convenience on the next operation.
        //
        let minor_bits = minor.to_bits();
        // This is (0 for even/1 for odd), shifted to be the leftmost bit, so that it's in the sign position
        // of f64 values.
        //
        let sign_bits = ((x + y) << 63) as u64;
        // Xor keeps the <destination sign> if the <sign operand> is 0, and changes it, if the <sign operand> is 1.
        //
        f64::from_bits(minor_bits ^ sign_bits)
    }
pub fn cofactor ( & self , y : usize , x : usize ) -> f64 { let minor = self . minor ( y , x ) ; // The data type is irrelevant here, as long as it supports bit shifts (float doesn't). // usize is used for convenience on the next operation. // let minor_bits = minor . to_bits ( ) ; // This is (0 for even/1 for odd), shifted to be the leftmost bit, so that it's in the sign position // of f64 values. // let sign_bits = ( ( x + y ) << 63 ) as u64 ; // Xor keeps the <destination sign> if the <sign operand> is 0, and changes it, if the <sign operand> is 1. // f64 :: from_bits ( minor_bits ^ sign_bits ) }
Mad lulz here.
Mad lulz here .
&self
y
usize
x
usize