public class FloatPower extends AbstractFloatScalarRel<PowerUnit,FloatPower>
FloatScalar.Rel<PowerUnit> value = new FloatScalar.Rel<PowerUnit>(100.0, PowerUnit.SI);we can now write:
FloatPower value = new FloatPower(100.0, PowerUnit.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 FloatPower |
NaN
constant with value NaN.
|
static FloatPower |
NEG_MAXVALUE
constant with value -MAX_VALUE.
|
static FloatPower |
NEGATIVE_INFINITY
constant with value NEGATIVE_INFINITY.
|
static FloatPower |
POS_MAXVALUE
constant with value MAX_VALUE.
|
static FloatPower |
POSITIVE_INFINITY
constant with value POSITIVE_INFINITY.
|
static FloatPower |
ZERO
constant with value zero.
|
si
Constructor and Description |
---|
FloatPower(double value,
PowerUnit unit)
Construct FloatPower scalar using a double value.
|
FloatPower(FloatPower value)
Construct FloatPower scalar.
|
FloatPower(float value,
PowerUnit unit)
Construct FloatPower scalar.
|
Modifier and Type | Method and Description |
---|---|
static FloatPower |
createSI(float value)
Construct FloatPower scalar.
|
FloatElectricalPotential |
divideBy(FloatElectricalCurrent v)
Calculate the division of FloatPower and FloatElectricalCurrent, which results in a FloatElectricalPotential scalar.
|
FloatElectricalCurrent |
divideBy(FloatElectricalPotential v)
Calculate the division of FloatPower and FloatElectricalPotential, which results in a FloatElectricalCurrent scalar.
|
FloatFrequency |
divideBy(FloatEnergy v)
Calculate the division of FloatPower and FloatEnergy, which results in a FloatFrequency scalar.
|
FloatSpeed |
divideBy(FloatForce v)
Calculate the division of FloatPower and FloatForce, which results in a FloatSpeed scalar.
|
FloatEnergy |
divideBy(FloatFrequency v)
Calculate the division of FloatPower and FloatFrequency, which results in a FloatEnergy scalar.
|
FloatDimensionless |
divideBy(FloatPower v)
Calculate the division of FloatPower and FloatPower, which results in a FloatDimensionless scalar.
|
FloatForce |
divideBy(FloatSpeed v)
Calculate the division of FloatPower and FloatSpeed, which results in a FloatForce scalar.
|
FloatPower |
instantiateRel(float value,
PowerUnit unit)
Construct a new Relative Immutable FloatScalar of the right type.
|
static FloatPower |
interpolate(FloatPower zero,
FloatPower one,
float ratio)
Interpolate between two values.
|
static FloatPower |
max(FloatPower r1,
FloatPower r2)
Return the maximum value of two relative scalars.
|
static FloatPower |
max(FloatPower r1,
FloatPower r2,
FloatPower... rn)
Return the maximum value of more than two relative scalars.
|
static FloatPower |
min(FloatPower r1,
FloatPower r2)
Return the minimum value of two relative scalars.
|
static FloatPower |
min(FloatPower r1,
FloatPower r2,
FloatPower... rn)
Return the minimum value of more than two relative scalars.
|
FloatEnergy |
multiplyBy(FloatDuration v)
Calculate the multiplication of FloatPower and FloatDuration, which results in a FloatEnergy 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 FloatPower ZERO
public static final FloatPower NaN
public static final FloatPower POSITIVE_INFINITY
public static final FloatPower NEGATIVE_INFINITY
public static final FloatPower POS_MAXVALUE
public static final FloatPower NEG_MAXVALUE
public FloatPower(float value, PowerUnit unit)
value
- float; float valueunit
- PowerUnit; unit for the float valuepublic FloatPower(FloatPower value)
value
- FloatPower; Scalar from which to construct this instancepublic FloatPower(double value, PowerUnit unit)
value
- double; double valueunit
- PowerUnit; unit for the resulting float valuepublic final FloatPower instantiateRel(float value, PowerUnit unit)
instantiateRel
in class AbstractFloatScalarRel<PowerUnit,FloatPower>
value
- float; the float valueunit
- U; the unitpublic static final FloatPower createSI(float value)
value
- float; float value in SI unitspublic static FloatPower interpolate(FloatPower zero, FloatPower one, float ratio)
zero
- FloatPower; the low valueone
- FloatPower; the high valueratio
- float; the ratio between 0 and 1, inclusivepublic static FloatPower max(FloatPower r1, FloatPower r2)
r1
- FloatPower; the first scalarr2
- FloatPower; the second scalarpublic static FloatPower max(FloatPower r1, FloatPower r2, FloatPower... rn)
r1
- FloatPower; the first scalarr2
- FloatPower; the second scalarrn
- FloatPower...; the other scalarspublic static FloatPower min(FloatPower r1, FloatPower r2)
r1
- FloatPower; the first scalarr2
- FloatPower; the second scalarpublic static FloatPower min(FloatPower r1, FloatPower r2, FloatPower... rn)
r1
- FloatPower; the first scalarr2
- FloatPower; the second scalarrn
- FloatPower...; the other scalarspublic final FloatDimensionless divideBy(FloatPower v)
v
- FloatPower; FloatPower scalarpublic final FloatEnergy multiplyBy(FloatDuration v)
v
- FloatDuration; FloatPower scalarpublic final FloatEnergy divideBy(FloatFrequency v)
v
- FloatFrequency; FloatPower scalarpublic final FloatFrequency divideBy(FloatEnergy v)
v
- FloatEnergy; FloatPower scalarpublic final FloatForce divideBy(FloatSpeed v)
v
- FloatSpeed; FloatPower scalarpublic final FloatSpeed divideBy(FloatForce v)
v
- FloatForce; FloatPower scalarpublic final FloatElectricalCurrent divideBy(FloatElectricalPotential v)
v
- FloatElectricalPotential; FloatPower scalarpublic final FloatElectricalPotential divideBy(FloatElectricalCurrent v)
v
- FloatElectricalCurrent; FloatPower scalarCopyright © 2015–2019 Delft University of Technology. All rights reserved.