Search in sources :

Example 1 with JScienceUnit

use of org.tensorics.core.units.JScienceUnit in project tensorics-core by tensorics.

the class JScienceQuantificationStrategy method standardUnitOf.

private <S extends Quantified> Unit standardUnitOf(S scalar) {
    Unit unit = scalar.unit();
    throwIfNotJScience(unit);
    return JScienceUnit.of(((JScienceUnit) unit).getUnit().getStandardUnit());
}
Also used : Unit(org.tensorics.core.units.Unit) JScienceUnit(org.tensorics.core.units.JScienceUnit) JScienceUnit(org.tensorics.core.units.JScienceUnit)

Aggregations

JScienceUnit (org.tensorics.core.units.JScienceUnit)1 Unit (org.tensorics.core.units.Unit)1