RoundNumberDirective class final
Rounds a numeric value to the nearest integer (as double).
Uses round-half-away-from-zero rounding (e.g., 2.5 → 3.0, -2.5 → -3.0).
Inspired by CSS round() function.
- Inheritance
-
- Object
- Directive<
num> - NumberDirective
- RoundNumberDirective
Constructors
- RoundNumberDirective()
-
const
Properties
Methods
-
apply(
num value) → num -
Applies the transformation to the given value.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override