public class FloatPressure extends TypedFloatScalarRel<PressureUnit,FloatPressure>
FloatScalar.Rel<PressureUnit> value = new FloatScalar.Rel<PressureUnit>(100.0, PressureUnit.SI);we can now write:
FloatPressure value = new FloatPressure(100.0, PressureUnit.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 DJUNITS License.
$LastChangedDate: 2016-05-28 14:25:52 +0200 (Sat, 28 May 2016) $, @version $Revision: 202 $, by $Author: averbraeck $,
initial version Sep 5, 2015
FloatScalar.Abs<U extends Unit<U>>, FloatScalar.Rel<U extends Unit<U>>| Modifier and Type | Field and Description |
|---|---|
static FloatPressure |
ZERO
constant with value zero.
|
si| Constructor and Description |
|---|
FloatPressure(double value,
PressureUnit unit)
Construct FloatPressure scalar using a double value.
|
FloatPressure(FloatPressure value)
Construct FloatPressure scalar.
|
FloatPressure(float value,
PressureUnit unit)
Construct FloatPressure scalar.
|
| Modifier and Type | Method and Description |
|---|---|
FloatDimensionless |
divideBy(FloatPressure v)
Calculate the division of FloatPressure and FloatPressure, which results in a FloatDimensionless scalar.
|
protected FloatPressure |
instantiateTypeRel(float value,
PressureUnit unit)
Construct a new Relative Immutable FloatScalar of the right type.
|
static FloatPressure |
interpolate(FloatPressure zero,
FloatPressure one,
float ratio)
Interpolate between two values.
|
static FloatPressure |
max(FloatPressure r1,
FloatPressure r2)
Return the maximum value of two relative scalars.
|
static FloatPressure |
max(FloatPressure r1,
FloatPressure r2,
FloatPressure... rn)
Return the maximum value of more than two relative scalars.
|
static FloatPressure |
min(FloatPressure r1,
FloatPressure r2)
Return the minimum value of two relative scalars.
|
static FloatPressure |
min(FloatPressure r1,
FloatPressure r2,
FloatPressure... rn)
Return the minimum value of more than two relative scalars.
|
FloatForce |
multiplyBy(FloatArea v)
Calculate the multiplication of FloatPressure and FloatArea, which results in a FloatForce scalar.
|
FloatEnergy |
multiplyBy(FloatVolume v)
Calculate the multiplication of FloatPressure and FloatVolume, which results in a FloatEnergy scalar.
|
abs, ceil, divideBy, floor, minus, multiplyBy, plus, rint, roundcompareTo, eq, ge, getSI, gt, le, lt, minus, 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 FloatPressure ZERO
public FloatPressure(float value,
PressureUnit unit)
value - float valueunit - unit for the float valuepublic FloatPressure(FloatPressure value)
value - Scalar from which to construct this instancepublic FloatPressure(double value,
PressureUnit unit)
value - double valueunit - unit for the resulting float valueprotected final FloatPressure instantiateTypeRel(float value, PressureUnit unit)
instantiateTypeRel in class TypedFloatScalarRel<PressureUnit,FloatPressure>value - the float valueunit - the unitpublic static FloatPressure interpolate(FloatPressure zero, FloatPressure one, float ratio)
zero - the low valueone - the high valueratio - the ratio between 0 and 1, inclusivepublic static FloatPressure max(FloatPressure r1, FloatPressure r2)
r1 - the first scalarr2 - the second scalarpublic static FloatPressure max(FloatPressure r1, FloatPressure r2, FloatPressure... rn)
r1 - the first scalarr2 - the second scalarrn - the other scalarspublic static FloatPressure min(FloatPressure r1, FloatPressure r2)
r1 - the first scalarr2 - the second scalarpublic static FloatPressure min(FloatPressure r1, FloatPressure r2, FloatPressure... rn)
r1 - the first scalarr2 - the second scalarrn - the other scalarspublic final FloatDimensionless divideBy(FloatPressure v)
v - FloatPressure scalarpublic final FloatForce multiplyBy(FloatArea v)
v - FloatPressure scalarpublic final FloatEnergy multiplyBy(FloatVolume v)
v - FloatPressure scalarCopyright © 2015–2016 Delft University of Technology. All rights reserved.