public class Acceleration extends TypedDoubleScalarRel<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-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
DoubleScalar.Abs<U extends Unit<U>>, DoubleScalar.Rel<U extends Unit<U>>| Modifier and Type | Field and Description |
|---|---|
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 |
|---|---|
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.
|
protected Acceleration |
instantiateTypeRel(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, 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 Acceleration ZERO
public Acceleration(double value,
AccelerationUnit unit)
value - double valueunit - unit for the double valuepublic Acceleration(Acceleration value)
value - Scalar from which to construct this instanceprotected final Acceleration instantiateTypeRel(double value, AccelerationUnit unit)
instantiateTypeRel in class TypedDoubleScalarRel<AccelerationUnit,Acceleration>value - the double valueunit - the unitpublic 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–2016 Delft University of Technology. All rights reserved.