public class FloatDirection extends TypedFloatScalarAbs<AngleUnit,FloatDirection,FloatAngle>
FloatScalar.Abs<AngleUnit> value = new FloatScalar.Abs<AngleUnit>(100.0, AngleUnit.SI);we can now write:
FloatDirection value = new FloatDirection(100.0, AngleUnit.SI);The compiler will automatically recognize which units belong to which quantity, and whether the quantity type and the unit used are compatible.
Copyright (c) 2013-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands.
All rights reserved.
BSD-style license. See OpenTrafficSim License.
$LastChangedDate: 2016-04-23 21:28:04 +0200 (Sat, 23 Apr 2016) $, @version $Revision: 191 $, by $Author: averbraeck $,
initial version Sep 1, 2015
FloatScalar.Abs<U extends Unit<U>>, FloatScalar.Rel<U extends Unit<U>>| Modifier and Type | Field and Description |
|---|---|
static FloatDirection |
ZERO
constant with value zero.
|
si| Constructor and Description |
|---|
FloatDirection(double value,
AngleUnit unit)
Construct FloatDirection scalar using a double value.
|
FloatDirection(float value,
AngleUnit unit)
Construct FloatDirection scalar.
|
FloatDirection(FloatDirection value)
Construct FloatDirection scalar.
|
| Modifier and Type | Method and Description |
|---|---|
protected FloatDirection |
instantiateTypeAbs(float value,
AngleUnit unit)
Construct a new Absolute Immutable FloatScalar of the right type.
|
protected FloatAngle |
instantiateTypeRel(float value,
AngleUnit unit)
Construct a new Relative Immutable FloatScalar of the right type.
|
static FloatDirection |
interpolate(FloatDirection zero,
FloatDirection one,
float ratio)
Interpolate between two values.
|
static FloatDirection |
max(FloatDirection a1,
FloatDirection a2)
Return the maximum value of two absolute scalars.
|
static FloatDirection |
max(FloatDirection a1,
FloatDirection a2,
FloatDirection... an)
Return the maximum value of more than two absolute scalars.
|
static FloatDirection |
min(FloatDirection a1,
FloatDirection a2)
Return the minimum value of two absolute scalars.
|
static FloatDirection |
min(FloatDirection a1,
FloatDirection a2,
FloatDirection... an)
Return the minimum value of more than two absolute scalars.
|
ceil, floor, minus, minus, plus, rint, round, toRelcompareTo, divideBy, eq, ge, getSI, gt, le, lt, minus, minus, multiplyBy, ne, plusdivide, divide, doubleValue, equals, floatValue, getInUnit, getInUnit, hashCode, interpolate, interpolate, intValue, longValue, minus, minus, minus, multiply, multiply, plus, plus, plus, toString, toString, toString, toStringexpressAsSIUnit, expressAsSpecifiedUnit, getUnit, isAbsolute, isRelativebyteValue, shortValueclone, finalize, getClass, notify, notifyAll, wait, wait, waitDIV, MULT, POWpublic static final FloatDirection ZERO
public FloatDirection(float value,
AngleUnit unit)
value - float valueunit - unit for the float valuepublic FloatDirection(double value,
AngleUnit unit)
value - float valueunit - unit for the float valuepublic FloatDirection(FloatDirection value)
value - Scalar from which to construct this instanceprotected final FloatDirection instantiateTypeAbs(float value, AngleUnit unit)
instantiateTypeAbs in class TypedFloatScalarAbs<AngleUnit,FloatDirection,FloatAngle>value - the float valueunit - the unitprotected final FloatAngle instantiateTypeRel(float value, AngleUnit unit)
instantiateTypeRel in class TypedFloatScalarAbs<AngleUnit,FloatDirection,FloatAngle>value - the float valueunit - the unitpublic static FloatDirection interpolate(FloatDirection zero, FloatDirection one, float ratio)
zero - the low valueone - the high valueratio - the ratio between 0 and 1, inclusivepublic static FloatDirection max(FloatDirection a1, FloatDirection a2)
a1 - the first scalara2 - the second scalarpublic static FloatDirection max(FloatDirection a1, FloatDirection a2, FloatDirection... an)
a1 - the first scalara2 - the second scalaran - the other scalarspublic static FloatDirection min(FloatDirection a1, FloatDirection a2)
a1 - the first scalara2 - the second scalarpublic static FloatDirection min(FloatDirection a1, FloatDirection a2, FloatDirection... an)
a1 - the first scalara2 - the second scalaran - the other scalarsCopyright © 2015–2016 Delft University of Technology. All rights reserved.