338e4799e6
Implementing epsilon function to retrieve EPSILON constant Hey! This PR exposes a new `epsilon` function in the `Float` trait so that users can access the `EPSILON` constant on the float types. I figured as this was such a minimal change it was easier to get a PR in offering the change then write up an issue. For me this is a valuable addition. When writing linear algebra or other optimization routines with generic floats we often want to check if some stopping criteria is reached, often something like: `(a - b).abs() < eps`. Having access to a standard _small value_ would make this a little easier. |
||
---|---|---|
.travis | ||
benches | ||
bigint | ||
complex | ||
doc | ||
integer | ||
iter | ||
macros | ||
rational | ||
src | ||
traits | ||
.gitignore | ||
.rustup.sh | ||
.travis.yml | ||
Cargo.toml | ||
LICENSE-APACHE | ||
LICENSE-MIT | ||
Makefile | ||
README.md |
README.md
num
A collection of numeric types and traits for Rust.
This includes new types for big integers, rationals, and complex numbers, new traits for generic programming on numeric properties like `Integer, and generic range iterators.
Usage
Add this to your Cargo.toml
:
[dependencies]
num = "0.1"
and this to your crate root:
extern crate num;