File tree 1 file changed +3
-15
lines changed 1 file changed +3
-15
lines changed Original file line number Diff line number Diff line change @@ -56,9 +56,7 @@ pub trait Real
56
56
///
57
57
/// The default implementation will panic if `f32::EPSILON` cannot
58
58
/// be cast to `Self`.
59
- fn epsilon ( ) -> Self {
60
- Self :: from ( :: std:: f32:: EPSILON ) . expect ( "Unable to cast from f32::EPSILON" )
61
- }
59
+ fn epsilon ( ) -> Self ;
62
60
63
61
/// Returns the largest finite value that this type can represent.
64
62
///
@@ -412,12 +410,7 @@ pub trait Real
412
410
///
413
411
/// assert!(abs_difference < 1e-10);
414
412
/// ```
415
- #[ inline]
416
- fn to_degrees ( self ) -> Self {
417
- let halfpi = Self :: zero ( ) . acos ( ) ;
418
- let ninety = Self :: from ( 90u8 ) . unwrap ( ) ;
419
- self * ninety / halfpi
420
- }
413
+ fn to_degrees ( self ) -> Self ;
421
414
422
415
/// Converts degrees to radians.
423
416
///
@@ -430,12 +423,7 @@ pub trait Real
430
423
///
431
424
/// assert!(abs_difference < 1e-10);
432
425
/// ```
433
- #[ inline]
434
- fn to_radians ( self ) -> Self {
435
- let halfpi = Self :: zero ( ) . acos ( ) ;
436
- let ninety = Self :: from ( 90u8 ) . unwrap ( ) ;
437
- self * halfpi / ninety
438
- }
426
+ fn to_radians ( self ) -> Self ;
439
427
440
428
/// Returns the maximum of the two numbers.
441
429
///
You can’t perform that action at this time.
0 commit comments