Crate libm[−][src]
Port of MUSL's libm to Rust
Usage
You can use this crate in two ways:
-
By directly using its free functions, e.g.
libm::powf
. -
By importing the
F32Ext
and / orF64Ext
extension traits to add methods likepowf
to thef32
andf64
types. Then you'll be able to invoke math functions as methods, e.g.x.sqrt()
.
Traits
F32Ext |
Math support for |
F64Ext |
Math support for |
Functions
expf | |
fabs | |
fabsf | |
floor | |
fmodf | |
hypot | |
hypotf | |
logf | |
powf | |
round | |
scalbn | |
scalbnf | |
sqrt | |
sqrtf | |
trunc | |
truncf |