Contents

isNull()

Returns a Boolean value indicating whether the unit is null.

Declaration

func isNull() -> Bool

Return Value

true if the unit is null; otherwise, false.

Discussion

Null units occur only when you create compound units in which all the units cancel out. For example, if you tried to create a unit by dividing deciliters by liters (dL/L), you would end up with a null unit.

See Also

Working with units