File tree 2 files changed +16
-0
lines changed
2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -1268,16 +1268,30 @@ macro_rules! float_impl {
1268
1268
<$T>:: log10( self )
1269
1269
}
1270
1270
1271
+ #[ cfg( feature = "std" ) ]
1271
1272
#[ inline]
1272
1273
fn to_degrees( self ) -> Self {
1273
1274
<$T>:: to_degrees( self )
1274
1275
}
1275
1276
1277
+ #[ cfg( feature = "std" ) ]
1276
1278
#[ inline]
1277
1279
fn to_radians( self ) -> Self {
1278
1280
<$T>:: to_radians( self )
1279
1281
}
1280
1282
1283
+ #[ cfg( not( feature = "std" ) ) ]
1284
+ #[ inline]
1285
+ fn to_degrees( self ) -> Self {
1286
+ self * ( 180. / :: core:: $T:: consts:: PI )
1287
+ }
1288
+
1289
+ #[ cfg( not( feature = "std" ) ) ]
1290
+ #[ inline]
1291
+ fn to_radians( self ) -> Self {
1292
+ self * ( :: core:: $T:: consts:: PI / 180. )
1293
+ }
1294
+
1281
1295
#[ cfg( feature = "std" ) ]
1282
1296
#[ inline]
1283
1297
fn max( self , other: Self ) -> Self {
Original file line number Diff line number Diff line change 14
14
html_root_url = "https://rust-num.github.io/num/" ,
15
15
html_playground_url = "http://play.integer32.com/" ) ]
16
16
17
+ #![ deny( unconditional_recursion) ]
18
+
17
19
#![ cfg_attr( not( feature = "std" ) , no_std) ]
18
20
#[ cfg( feature = "std" ) ]
19
21
extern crate core;
You can’t perform that action at this time.
0 commit comments