isValueZero
Returns whether the value portion of the UnitAlgebra is 0.
Syntax
ua.isValueZero()
Parameters
- returns a boolean indicating whether the UnitAlgebra is 0 or not
Example
from sst import UnitAlgebra
ua0 = UnitAlgebra("0us")
ua1 = ua0 + UnitAlgebra("1ns")
print("'%s'.isValueZero() = %r"%(ua0.bestSI(), ua0.isValueZero()))
print("'%s'.isValueZero() = %r"%(ua1.bestSI(), ua1.isValueZero()))
Output
'0 s'.isValueZero() = True
'1 ns'.isValueZero() = False
Import
from sst import UnitAlgebra