Remove traits from README
This commit is contained in:
parent
b3f86d7737
commit
3f815cee8b
17
README.md
17
README.md
@ -18,22 +18,7 @@ term goal is to enable [math support in the `core` crate][core].
|
||||
|
||||
## Already usable
|
||||
|
||||
This crate is [on crates.io] and can be used today in stable `#![no_std]` programs like this:
|
||||
|
||||
[on crates.io]: https://crates.io/crates/libm
|
||||
|
||||
``` rust
|
||||
#![no_std]
|
||||
|
||||
extern crate libm;
|
||||
|
||||
use libm::F32Ext; // adds methods to `f32`
|
||||
|
||||
fn foo(x: f32) {
|
||||
let y = x.sqrt();
|
||||
let z = libm::truncf(x);
|
||||
}
|
||||
```
|
||||
This crate is [on crates.io] and can be used today in stable `#![no_std]` programs.
|
||||
|
||||
The API documentation can be found [here](https://docs.rs/libm).
|
||||
|
||||
|
10
src/lib.rs
10
src/lib.rs
@ -1,14 +1,4 @@
|
||||
//! libm in pure 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 / or `F64Ext` extension traits to add methods like `powf` to the
|
||||
//! `f32` and `f64` types. Then you'll be able to invoke math functions as methods, e.g. `x.sqrt()`.
|
||||
|
||||
#![deny(warnings)]
|
||||
#![no_std]
|
||||
#![cfg_attr(
|
||||
|
Loading…
x
Reference in New Issue
Block a user