ecl-logo Documentation

PositiveQuantityQ

PositiveQuantityQ[item]bool

returns a bool indicating if item is a unit-ed value with positive magnitude in its base unit.

Details

    Input
    Output
    Attributes
  • Listable

Examples

Basic Examples  (3)

Return True for an input with units and a positive magnitude:

Return False for a dimension-less input with a positive magnitude:

Return False for a unit-ed input with a negative magnitude:

Additional Examples  (4)

Percentages are considered unit-ed:

A directly-provided quantity will be assessed for its magnitude, even if it has a negative magnitude in another unit:

A quantity, when converted, will have its magnitude assessed after the conversion:

Quantities with zero magnitude return False:

Attributes  (1)

Listable  (1)

The function is listable: