rust/fpnum/src/lib.rs
changeset 14139 37c99587825d
parent 14122 c27461e6a9eb
child 14140 3078123e84ea
equal deleted inserted replaced
14138:417d81c72119 14139:37c99587825d
    45             value: self.value,
    45             value: self.value,
    46         }
    46         }
    47     }
    47     }
    48 
    48 
    49     #[inline]
    49     #[inline]
    50     pub fn round(&self) -> i64 {
    50     pub fn round(&self) -> i32 {
    51         if self.is_negative {
    51         if self.is_negative {
    52             -((self.value >> 32) as i64)
    52             -((self.value >> 32) as i32)
    53         } else {
    53         } else {
    54             (self.value >> 32) as i64
    54             (self.value >> 32) as i32
    55         }
    55         }
    56     }
    56     }
    57 
    57 
    58     #[inline]
    58     #[inline]
    59     pub fn abs_round(&self) -> u32 {
    59     pub fn abs_round(&self) -> u32 {