Expand description
Minimal fixed point arithmetic primitives and types for runtime.
Re-exports§
pub use fixed_point::FixedPointNumber;pub use fixed_point::FixedPointOperand;pub use fixed_point::FixedI64;pub use fixed_point::FixedI128;pub use fixed_point::FixedU128;pub use per_things::PerThing;pub use per_things::InnerOf;pub use per_things::UpperOf;pub use per_things::Percent;pub use per_things::PerU16;pub use per_things::Permill;pub use per_things::Perbill;pub use per_things::Perquintill;pub use rational::Rational128;pub use rational::RationalInfinite;
Modules§
- biguint
- Infinite precision unsigned integer for tetcore runtime.
- fixed_
point - Decimal Fixed Point implementations for Tetcore runtime.
- helpers_
128bit - Some helper functions to work with 128bit numbers. Note that the functionality provided here is only sensible to use with 128bit numbers because for smaller sizes, you can always rely on assumptions of a bigger type (u128) being available, or simply create a per-thing and use the multiplication implementation provided there.
- per_
things - rational
- traits
- Primitive traits for the runtime arithmetic.
Macros§
- assert_
eq_ error_ rate - Copied from
tp-runtimeand documented there.
Traits§
- Normalizable
- A collection-like object that is made of values of type
Tand can normalize its individual values around a centric point. - Threshold
Ord - Trait for comparing two numbers with an threshold.
Functions§
- normalize
- Normalize
inputso that the sum of all elements reachestargeted_sum.