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