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-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 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; double valueunit
- AccelerationUnit; unit for the double valuepublic Acceleration(Acceleration value)
value
- Acceleration; Scalar from which to construct this instancepublic final Acceleration instantiateRel(double value, AccelerationUnit unit)
instantiateRel
in class AbstractDoubleScalarRel<AccelerationUnit,Acceleration>
value
- double; the double valueunit
- U; the unitpublic static final Acceleration createSI(double value)
value
- double; double value in SI unitspublic static Acceleration interpolate(Acceleration zero, Acceleration one, double ratio)
zero
- Acceleration; the low valueone
- Acceleration; the high valueratio
- double; the ratio between 0 and 1, inclusivepublic static Acceleration max(Acceleration r1, Acceleration r2)
r1
- Acceleration; the first scalarr2
- Acceleration; the second scalarpublic static Acceleration max(Acceleration r1, Acceleration r2, Acceleration... rn)
r1
- Acceleration; the first scalarr2
- Acceleration; the second scalarrn
- Acceleration...; the other scalarspublic static Acceleration min(Acceleration r1, Acceleration r2)
r1
- Acceleration; the first scalarr2
- Acceleration; the second scalarpublic static Acceleration min(Acceleration r1, Acceleration r2, Acceleration... rn)
r1
- Acceleration; the first scalarr2
- Acceleration; the second scalarrn
- Acceleration...; the other scalarspublic final Dimensionless divideBy(Acceleration v)
v
- Acceleration; Acceleration scalarpublic final Force multiplyBy(Mass v)
v
- Mass; Acceleration scalarpublic final Speed multiplyBy(Duration v)
v
- Duration; Acceleration scalarpublic final Speed divideBy(Frequency v)
v
- Frequency; Acceleration scalarCopyright © 2015–2019 Delft University of Technology. All rights reserved.