Expand description
The low level color math behind the more high level
palette crate. This create’s primary
purpose is to facilitate palette, but its content is also useable on its
own.
§Getting Started
Add the following lines to your Cargo.toml file:
[dependencies]
palette_math = "0.7.6"or this if you want to opt out of std:
# Uses libm instead of std for floating point math:
palette_math = { version = "0.7.6", features = ["libm"], default-features = false }§Cargo Features
These features are enabled by default:
"std"- Enables use of thestdlibrary, primarily for floating point math. Also enables"alloc"."alloc"- Enables the use of types that may allocate memory, such asVec.
These features are disabled by default:
"libm"- Uses thelibmfloating point math library (for when thestdfeature is disabled)."wide"- Enables support for using SIMD types fromwide.
§Embedded And #![no_std]
palette_math supports #![no_std] environments by disabling the "std"
feature. It uses [libm], via the "libm" feature, to provide the
floating-point operations that are typically in std, and the "alloc"
feature to provide features that use allocating types.