f32 and f64 added to_bits.
This allowed us to take the transmute out and remove some unsafe code.
This commit is contained in:
@ -704,7 +704,7 @@ impl Real for f32
|
||||
let mantissa: u32;
|
||||
let mut exponent: i16;
|
||||
|
||||
bits = unsafe { ::std::mem::transmute(self) };
|
||||
bits = self.to_bits();
|
||||
if bits >> 31 == 0
|
||||
{
|
||||
sign = 1;
|
||||
@ -963,7 +963,7 @@ impl Real for f64
|
||||
let mantissa: u64;
|
||||
let mut exponent: i16;
|
||||
|
||||
bits = unsafe { ::std::mem::transmute(self) };
|
||||
bits = self.to_bits();
|
||||
if bits >> 63 == 0
|
||||
{
|
||||
sign = 1;
|
||||
|
Reference in New Issue
Block a user