public class FloatAcceleration extends AbstractFloatScalarRel<AccelerationUnit,FloatAcceleration>
FloatScalar.Rel<AccelerationUnit> value = new FloatScalar.Rel<AccelerationUnit>(100.0, AccelerationUnit.SI);we can now write:
FloatAcceleration value = new FloatAcceleration(100.0, AccelerationUnit.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-2018 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUNITS License.
$LastChangedDate: 2018-01-28 03:17:44 +0100 (Sun, 28 Jan 2018) $, @version $Revision: 256 $, by $Author: averbraeck $,
initial version Sep 5, 2015
Modifier and Type | Field and Description |
---|---|
static FloatAcceleration |
NaN
constant with value NaN.
|
static FloatAcceleration |
NEG_MAXVALUE
constant with value -MAX_VALUE.
|
static FloatAcceleration |
NEGATIVE_INFINITY
constant with value NEGATIVE_INFINITY.
|
static FloatAcceleration |
POS_MAXVALUE
constant with value MAX_VALUE.
|
static FloatAcceleration |
POSITIVE_INFINITY
constant with value POSITIVE_INFINITY.
|
static FloatAcceleration |
ZERO
constant with value zero.
|
si
Constructor and Description |
---|
FloatAcceleration(double value,
AccelerationUnit unit)
Construct FloatAcceleration scalar using a double value.
|
FloatAcceleration(FloatAcceleration value)
Construct FloatAcceleration scalar.
|
FloatAcceleration(float value,
AccelerationUnit unit)
Construct FloatAcceleration scalar.
|
Modifier and Type | Method and Description |
---|---|
static FloatAcceleration |
createSI(float value)
Construct FloatAcceleration scalar.
|
FloatDimensionless |
divideBy(FloatAcceleration v)
Calculate the division of FloatAcceleration and FloatAcceleration, which results in a FloatDimensionless scalar.
|
FloatSpeed |
divideBy(FloatFrequency v)
Calculate the division of FloatAcceleration and FloatFrequency, which results in a FloatSpeed scalar.
|
FloatFrequency |
divideBy(FloatSpeed v)
Calculate the division of FloatAcceleration and FloatSpeed, which results in a FloatFrequency scalar.
|
FloatAcceleration |
instantiateRel(float value,
AccelerationUnit unit)
Construct a new Relative Immutable FloatScalar of the right type.
|
static FloatAcceleration |
interpolate(FloatAcceleration zero,
FloatAcceleration one,
float ratio)
Interpolate between two values.
|
static FloatAcceleration |
max(FloatAcceleration r1,
FloatAcceleration r2)
Return the maximum value of two relative scalars.
|
static FloatAcceleration |
max(FloatAcceleration r1,
FloatAcceleration r2,
FloatAcceleration... rn)
Return the maximum value of more than two relative scalars.
|
static FloatAcceleration |
min(FloatAcceleration r1,
FloatAcceleration r2)
Return the minimum value of two relative scalars.
|
static FloatAcceleration |
min(FloatAcceleration r1,
FloatAcceleration r2,
FloatAcceleration... rn)
Return the minimum value of more than two relative scalars.
|
FloatSpeed |
multiplyBy(FloatDuration v)
Calculate the multiplication of FloatAcceleration and FloatDuration, which results in a FloatSpeed scalar.
|
FloatForce |
multiplyBy(FloatMass v)
Calculate the multiplication of FloatAcceleration and FloatMass, which results in a FloatForce scalar.
|
abs, ceil, divideBy, floor, minus, multiplyBy, neg, plus, rint, round
compareTo, doubleValue, eq, eq0, equals, floatValue, ge, ge0, getInUnit, getInUnit, getSI, gt, gt0, hashCode, intValue, le, le0, longValue, lt, lt0, ne, ne0, toString, toString, toString, toString
expressAsSIUnit, expressAsSpecifiedUnit, getUnit, isAbsolute, isRelative, setDisplayUnit
byteValue, shortValue
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
DIV, MULT, POW
public static final FloatAcceleration ZERO
public static final FloatAcceleration NaN
public static final FloatAcceleration POSITIVE_INFINITY
public static final FloatAcceleration NEGATIVE_INFINITY
public static final FloatAcceleration POS_MAXVALUE
public static final FloatAcceleration NEG_MAXVALUE
public FloatAcceleration(float value, AccelerationUnit unit)
value
- float valueunit
- unit for the float valuepublic FloatAcceleration(FloatAcceleration value)
value
- Scalar from which to construct this instancepublic FloatAcceleration(double value, AccelerationUnit unit)
value
- double valueunit
- unit for the resulting float valuepublic final FloatAcceleration instantiateRel(float value, AccelerationUnit unit)
instantiateRel
in class AbstractFloatScalarRel<AccelerationUnit,FloatAcceleration>
value
- the float valueunit
- the unitpublic static final FloatAcceleration createSI(float value)
value
- float value in SI unitspublic static FloatAcceleration interpolate(FloatAcceleration zero, FloatAcceleration one, float ratio)
zero
- the low valueone
- the high valueratio
- the ratio between 0 and 1, inclusivepublic static FloatAcceleration max(FloatAcceleration r1, FloatAcceleration r2)
r1
- the first scalarr2
- the second scalarpublic static FloatAcceleration max(FloatAcceleration r1, FloatAcceleration r2, FloatAcceleration... rn)
r1
- the first scalarr2
- the second scalarrn
- the other scalarspublic static FloatAcceleration min(FloatAcceleration r1, FloatAcceleration r2)
r1
- the first scalarr2
- the second scalarpublic static FloatAcceleration min(FloatAcceleration r1, FloatAcceleration r2, FloatAcceleration... rn)
r1
- the first scalarr2
- the second scalarrn
- the other scalarspublic final FloatDimensionless divideBy(FloatAcceleration v)
v
- FloatAcceleration scalarpublic final FloatForce multiplyBy(FloatMass v)
v
- FloatAcceleration scalarpublic final FloatSpeed multiplyBy(FloatDuration v)
v
- FloatAcceleration scalarpublic final FloatSpeed divideBy(FloatFrequency v)
v
- FloatAcceleration scalarpublic final FloatFrequency divideBy(FloatSpeed v)
v
- FloatAcceleration scalarCopyright © 2015–2018 Delft University of Technology. All rights reserved.