org.das2.datum.Datum

A Datum is a number in the context of a Unit, for example "15 microseconds." A Datum object has methods for formatting itself as a String, representing itself as a double in the context of another Unit, and mathematical operators that allow simple calculations to be made at the physical quantities. Also a Datum's precision can be limited to improve formatting.


intValue

intValue( Units units ) → int

returns a int representing the datum in the context of units.

Parameters

units - the Units in which the int should be returned

Returns:

a double in the context of the provided units.

search for examples view on GitHub view source


isFinite

isFinite( ) → boolean

returns true if the value is finite, that is not INFINITY or NaN.

Returns:

true if the value is finite, that is not INFINITY or NaN.

search for examples view on GitHub view source


minus

minus( Datum datum ) → Datum

Groovy scripting language uses this for overloading.

Parameters

datum - Datum to subtract, that is convertible to this.getUnits().

Returns:

a Datum that is the sum of the two values in this Datum's units.

search for examples view on GitHub view source


negative

negative( ) → Datum

Groovy scripting language uses this negation operator.

Returns:

a Datum such that it plus this is 0.

search for examples view on GitHub view source


plus

plus( Datum datum ) → Datum

Groovy scripting language uses this for overloading.

Parameters

datum - Datum to add, that is convertible to this.getUnits().

Returns:

a Datum that is the sum of the two values in this Datum's units.

search for examples view on GitHub view source


positive

positive( ) → Datum

Groovy scripting language uses this positive operator.

Returns:

this datum.

search for examples view on GitHub view source


power

power( double b ) → Datum

Groovy scripting language uses this for overloading a**b.

Parameters

b - double to exponentiate, that is dimensionless.

Returns:

a Datum that is the exponentiate of the two values in this Datum's units.

search for examples view on GitHub view source