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