This repository was archived by the owner on Apr 28, 2025. It is now read-only.
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].
1818
1919## Already usable
2020
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.
3722
3823The API documentation can be found [ here] ( https://docs.rs/libm ) .
3924
Original file line number Diff line number Diff line change 11//! 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-
122#![ deny( warnings) ]
133#![ no_std]
144#![ cfg_attr(
You can’t perform that action at this time.
0 commit comments