isZeroOrNegative property
Returns true if the number is zero or negative.
This is a convenient way to check if a number is not strictly positive.
Example:
5.isZeroOrNegative; // Returns false
0.isZeroOrNegative; // Returns true
(-3).isZeroOrNegative; // Returns true
Returns false for NaN (see isNotZeroOrNegative).
Audited: 2026-06-13
Implementation
@useResult
bool get isZeroOrNegative => this <= 0;