File tree Expand file tree Collapse file tree 2 files changed +1
-26
lines changed Expand file tree Collapse file tree 2 files changed +1
-26
lines changed Original file line number Diff line number Diff line change @@ -18,22 +18,7 @@ term goal is to enable [math support in the `core` crate][core].
18
18
19
19
## Already usable
20
20
21
- This crate is [ on crates.io] and can be used today in stable ` #![no_std] ` programs like this:
22
-
23
- [ on crates.io ] : https://crates.io/crates/libm
24
-
25
- ``` rust
26
- #![no_std]
27
-
28
- extern crate libm;
29
-
30
- use libm :: F32Ext ; // adds methods to `f32`
31
-
32
- fn foo (x : f32 ) {
33
- let y = x . sqrt ();
34
- let z = libm :: truncf (x );
35
- }
36
- ```
21
+ This crate is [ on crates.io] and can be used today in stable ` #![no_std] ` programs.
37
22
38
23
The API documentation can be found [ here] ( https://docs.rs/libm ) .
39
24
Original file line number Diff line number Diff line change 1
1
//! libm in pure Rust
2
- //!
3
- //! # Usage
4
- //!
5
- //! You can use this crate in two ways:
6
- //!
7
- //! - By directly using its free functions, e.g. `libm::powf`.
8
- //!
9
- //! - By importing the `F32Ext` and / or `F64Ext` extension traits to add methods like `powf` to the
10
- //! `f32` and `f64` types. Then you'll be able to invoke math functions as methods, e.g. `x.sqrt()`.
11
-
12
2
#![ deny( warnings) ]
13
3
#![ no_std]
14
4
#![ cfg_attr(
You can’t perform that action at this time.
0 commit comments