CollectiveNum extension

on

Methods

addValue(num other) num
Adds two numbers. This is equivalent to the + operator. Returns the sum of this and other.
ceilWithPrecision(int precision) num
Computes number rounded up to precision. This is equivalent to the ceil function. Returns the smallest integer greater than or equal to this. If precision is null, this is returned. If precision is 0, this is returned.
divideValue(num other) num
Divide two numbers. This is equivalent to the / operator. Returns the quotient of this and other.
equal(num b) bool
Performs a SameValueZero comparison between two values to determine if they are equivalent. This is equivalent to the == operator.
floorWithPrecision([num precision = 1]) num
Computes number rounded down to precision. This is equivalent to the floor function. Returns the largest integer less than or equal to this. If precision is null, this is returned.
getValue(List path, [dynamic defaultValue]) → dynamic
Gets the value at path of object. If the resolved value is undefined, the defaultValue is returned in its place. This is equivalent to the get function. Returns the resolved value.
greaterThan(num other) bool
Checks if value is greater than other. This is equivalent to the > operator. Returns true if this is greater than other. Returns false if this is less than or equal to other.
greaterThanOrEqual(num other) bool
Checks if value is greater than or equal to other. This is equivalent to the >= operator. Returns true if this is greater than or equal to other. Returns false if this is less than other.
isInRange(num start, [num? end]) bool
Checks if n is between start and up to, but not including, end. If end is not specified,
lessThan(num other) bool
Checks if value is less than other. This is equivalent to the < operator. Returns true if this is less than other. Returns false if this is greater than or equal to other.
multiplyValue(num other) num
Multiply two numbers. This is equivalent to the * operator.
roundWithPrecision([num precision = 1]) num
Computes number rounded to precision. This is equivalent to the round function.
subtractValue(num other) num
Subtract two numbers. This is equivalent to the - operator.