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