|0.1.2||Sep 2, 2021|
|0.1.1||Aug 29, 2021|
|0.1.0||Aug 22, 2021|
|0.0.0-reserve.0||Aug 10, 2021|
#1200 in Math
98 downloads per month
Used in 5 crates (2 directly)
figures utilizes the Rust type system to prevent performing math on numbers
with different units. The core types in
figures all accept arbitrary unit
types, allowing you to safely manage numbers in a wide variety of use cases
while allowing the Rust compiler to help you prevent easy mistakes.
While the core types support any arbitrary units,
figures defines three built in units:
Pixels: Represents physical pixels on a display.
Points: Represents a DPI-scaled resolution, as configured in the operating system.
Scaled: Represents an arbitrarily scaled resolution, enabling applications to add a "user interface scale" option to their applications easily.
To ease converting between these three units, the
Displayable trait is implemented by all measurement types in this library.
This library is born of a difference of opinions from the excellent library
euclid. Ultimately, I disagree on some
fundamental design decisions. One of the most prevalent is that in
you are prevented from adding a Point and a Size together. In
are able to interoperate with more types freely.
The second major change from
euclid is embracing the
type throughout the types. APIs will often favor returning a
instead of the raw type.
This library is hyper-focused on being a minimalistic math library for
euclid has more functionality.
While we may accept PRs for some additional functionality, if you're looking for
a more complete library,
euclid should be your choice.