public class DirectionUnit extends AbsoluteLinearUnit<DirectionUnit,AngleUnit>
Note that the Direction is counterclockwise.
Copyright (c) 2015-2018 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUNITS License.
$LastChangedDate: 2017-01-30 14:23:11 +0100 (Mon, 30 Jan 2017) $, @version $Revision: 234 $, by $Author: averbraeck $,
initial version May 15, 2014
Modifier and Type | Field and Description |
---|---|
static DirectionUnit |
BASE
The BASE unit for direction with an artificial origin.
|
static DirectionUnit |
EAST_DEGREE
The unit for direction with East as the origin and degrees as the displacement.
|
static DirectionUnit |
EAST_RADIAN
The unit for direction with East as the origin and radians as the displacement.
|
static DirectionUnit |
NORTH_DEGREE
The unit for direction with North as the origin and degrees as the displacement.
|
static DirectionUnit |
NORTH_RADIAN
The unit for direction with North as the origin and radians as the displacement.
|
STANDARD_UNITS
Constructor and Description |
---|
DirectionUnit(String name,
String abbreviation,
UnitSystem unitSystem,
double scaleFactor,
double offset,
AngleUnit relativeUnit)
Build a user-defined DirectionUnit with a scale factor and offset to the base DirectionUnit.
|
Modifier and Type | Method and Description |
---|---|
String |
getSICoefficientsString() |
DirectionUnit |
getStandardUnit() |
equals, equalsIgnoreNaming, getOffset, getRelativeUnit, getScale, hashCode
getScaleFactor
generateHashCode, getAbbreviation, getAbbreviationKey, getAllUnitsOfThisType, getName, getNameKey, getSICoefficients, getUnits, getUnitSystem, isBaseSIUnit, isLocalizable, lookupOrCreateSIUnitWithSICoefficients, lookupOrCreateUnitWithSICoefficients, lookupUnitWithSICoefficients, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getScaleFactor
public static final DirectionUnit BASE
public static final DirectionUnit NORTH_RADIAN
public static final DirectionUnit NORTH_DEGREE
public static final DirectionUnit EAST_RADIAN
public static final DirectionUnit EAST_DEGREE
public DirectionUnit(String name, String abbreviation, UnitSystem unitSystem, double scaleFactor, double offset, AngleUnit relativeUnit)
name
- the long name of the unitabbreviation
- the abbreviation of the unitunitSystem
- the unit system, e.g. SI or ImperialscaleFactor
- multiply a value in this unit by the factor to convert to the given reference unitoffset
- the offset to the reference unit to add to convert to the standard (e.g., BASE) unitrelativeUnit
- the corresponding relative unit belonging to this absolute unitpublic final DirectionUnit getStandardUnit()
getStandardUnit
in class Unit<DirectionUnit>
public final String getSICoefficientsString()
getSICoefficientsString
in class Unit<DirectionUnit>
Copyright © 2015–2018 Delft University of Technology. All rights reserved.