//! Fixed-point decimal arithmetic.
//!
//! `FixedPoint<T, DECIMALS>` provides deterministic decimal arithmetic
//! over integer backing types. All operations return `Option` on overflow.
//!
//! ```ignore
//! type Amount = FixedPoint<u128, 18>;
//! let a = Amount::from_integer(100);
//! let b = Amount::from_decimal(3, 14).unwrap(); // 3.14
//! let c = a.checked_mul(b).unwrap(); // 314.00
//! ```
/// Fixed-point decimal number backed by integer type `T` with
/// `DECIMALS` fractional digits.
///
/// The raw value is `value * 10^DECIMALS`. For example,
/// `FixedPoint<u64, 6>` with raw value `1_000_000` represents `1.0`.
// --- u64 specialization ---
// --- u128 specialization ---
Homonyms
cyb/evy/forks/naga/src/back/hlsl/mod.rs
struct Baz { m: mat3x2, } struct Baz { float2 m_0; float2 m_1; float2 m_2; }; float3x2 GetMatmOnBaz(Baz obj) { return float3x2(obj.m_0, obj.m_1, obj.m_2); }