ReactiveNum extension

Extension for Reactive<num> providing common numeric utilities.

on

Properties

isNegative → bool

Available on Reactive<num>, provided by the ReactiveNum extension

Returns true if the value is negative (< 0).
no setter
isPositive → bool

Available on Reactive<num>, provided by the ReactiveNum extension

Returns true if the value is positive (> 0).
no setter
isZero → bool

Available on Reactive<num>, provided by the ReactiveNum extension

Returns true if the value is exactly zero.
no setter

Methods

clamp(int min, int max) → void

Available on Reactive<num>, provided by the ReactiveNum extension

Clamps the numeric value between min and max.
dec([num by = 1]) → void

Available on Reactive<num>, provided by the ReactiveNum extension

Alias for decrement.
decrement([num by = 1]) → void

Available on Reactive<num>, provided by the ReactiveNum extension

Decrements the numeric value by by (default: 1).
inc([num by = 1]) → void

Available on Reactive<num>, provided by the ReactiveNum extension

Alias for increment.
increment([num by = 1]) → void

Available on Reactive<num>, provided by the ReactiveNum extension

Increments the numeric value by by (default: 1).
roundTo(int digits) → void

Available on Reactive<num>, provided by the ReactiveNum extension

Rounds the numeric value to digits decimal places.

Operators

operator %(Object other) → num

Available on Reactive<num>, provided by the ReactiveNum extension

operator *(Object other) → num

Available on Reactive<num>, provided by the ReactiveNum extension

operator +(Object other) → num

Available on Reactive<num>, provided by the ReactiveNum extension

operator -(Object other) → num

Available on Reactive<num>, provided by the ReactiveNum extension

operator /(Object other) → double

Available on Reactive<num>, provided by the ReactiveNum extension

operator <(Object other) → bool

Available on Reactive<num>, provided by the ReactiveNum extension

operator <=(Object other) → bool

Available on Reactive<num>, provided by the ReactiveNum extension

operator >(Object other) → bool

Available on Reactive<num>, provided by the ReactiveNum extension

operator >=(Object other) → bool

Available on Reactive<num>, provided by the ReactiveNum extension

operator unary-() → num

Available on Reactive<num>, provided by the ReactiveNum extension

operator ~/(Object other) → int

Available on Reactive<num>, provided by the ReactiveNum extension