Introduce Duration.isPositive method

This commit is contained in:
Ilya Gorbunov
2019-08-08 20:00:09 +03:00
parent 4befca95d6
commit 4de9361c37
3 changed files with 9 additions and 1 deletions
@@ -75,6 +75,9 @@ public inline class Duration internal constructor(internal val value: Double) :
/** Returns true, if the duration value is less than zero. */
public fun isNegative(): Boolean = value < 0
/** Returns true, if the duration value is greater than zero. */
public fun isPositive(): Boolean = value > 0
/** Returns true, if the duration value is infinite. */
public fun isInfinite(): Boolean = value.isInfinite()