(n: BigDecimal)
| 1535 | * BigDecimal.isNegative(BigDecimal.fromStringUnsafe("-1")) // => true |
| 1536 | * BigDecimal.isNegative(BigDecimal.fromStringUnsafe("0")) // => false |
| 1537 | * BigDecimal.isNegative(BigDecimal.fromStringUnsafe("1")) // => false |
| 1538 | * ``` |
| 1539 | * |
| 1540 | * @category predicates |
| 1541 | * @since 2.0.0 |
| 1542 | */ |
| 1543 | export const isNegative = (n: BigDecimal): boolean => n.value < bigint0 |
| 1544 | |
| 1545 | /** |
| 1546 | * Checks whether a given `BigDecimal` is positive. |
| 1547 | * |
| 1548 | * **When to use** |
| 1549 | * |
| 1550 | * Use to test whether a `BigDecimal` is greater than zero. |
| 1551 | * |
| 1552 | * **Example** (Checking positive decimals) |
| 1553 | * |
| 1554 | * ```ts import.meta.vitest |
| 1555 | * import { BigDecimal } from "effect" |
| 1556 | * |
| 1557 | * BigDecimal.isPositive(BigDecimal.fromStringUnsafe("-1")) // => false |
no test coverage detected
searching dependent graphs…