QuantityOrigin class

An origin point for a QuantityPoint, representing a Quantity away from the absolute zero point.

For example, a temperature origin might be 273.15 K (0 °C).

Implemented types

Constructors

QuantityOrigin(Quantity quantity)
const
QuantityOrigin.zero(Dimensions dimensions)

Properties

deltaFromZero → Quantity
The delta difference between this origin and absolute zero.
no setteroverride
dimensions → Dimensions
The dimensions of (the units of) this origin.
no setter
hashCode → int
The hash code for this object.
no setteroverride
isZero → bool
Whether this origin is absolute zero itself.
no setter
quantity → Quantity
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
unit → Unit
The unit of this origin.
no setter

Methods

checked(Quantity other) → Quantity
Ensures that other has the same dimensions as this origin's quantity.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
The shortest string that correctly represents this origin's distance from absolute zero.
override

Operators

operator +(Quantity addend) → QuantityPoint
Creates a QuantityPoint by adding a Quantity to this origin.
operator -(Quantity subtrahend) → QuantityPoint
Creates a QuantityPoint by subtracting a Quantity from this origin.
operator ==(Object other) → bool
Test whether this origin is equal to other.
override