public class Dimensionless extends AbstractDoubleScalarRel<DimensionlessUnit,Dimensionless> implements MathFunctionsDimensionless<Dimensionless>
DoubleScalar.Rel<DimensionlessUnit> value = new DoubleScalar.Rel<DimensionlessUnit>(100.0, DimensionlessUnit.SI);we can now write:
Dimensionless value = new Dimensionless(100.0, DimensionlessUnit.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-03-03 00:53:50 +0100 (Sun, 03 Mar 2019) $, @version $Revision: 349 $, by $Author: averbraeck $,
initial version Sep 5, 2015
Modifier and Type | Field and Description |
---|---|
static Dimensionless |
NaN
constant with value NaN.
|
static Dimensionless |
NEG_MAXVALUE
constant with value -MAX_VALUE.
|
static Dimensionless |
NEGATIVE_INFINITY
constant with value NEGATIVE_INFINITY.
|
static Dimensionless |
POS_MAXVALUE
constant with value MAX_VALUE.
|
static Dimensionless |
POSITIVE_INFINITY
constant with value POSITIVE_INFINITY.
|
static Dimensionless |
ZERO
constant with value zero.
|
si
NUMBER_PATTERN
Constructor and Description |
---|
Dimensionless(Dimensionless value)
Construct Dimensionless scalar.
|
Dimensionless(double value,
DimensionlessUnit unit)
Construct Dimensionless scalar.
|
Modifier and Type | Method and Description |
---|---|
Dimensionless |
acos()
Set the value(s) to the arc cosine of the value(s); the resulting angle is in the range 0.0 through pi.
|
Dimensionless |
asin()
Set the value(s) to the arc sine of the value(s); the resulting angle is in the range -pi/2 through pi/2.
|
Dimensionless |
atan()
Set the value(s) to the arc tangent of the value(s); the resulting angle is in the range -pi/2 through pi/2.
|
Dimensionless |
cbrt()
Set the value(s) to the(ir) cube root.
|
Dimensionless |
cos()
Set the value(s) to the trigonometric cosine of the value(s).
|
Dimensionless |
cosh()
Set the value(s) to the hyperbolic cosine of the value(s).
|
static Dimensionless |
createSI(double value)
Construct Dimensionless scalar.
|
Dimensionless |
divideBy(Dimensionless v)
Calculate the division of Dimensionless and Dimensionless, which results in a Dimensionless scalar.
|
Frequency |
divideBy(Duration v)
Calculate the division of Dimensionless and Duration, which results in a Frequency scalar.
|
Duration |
divideBy(Frequency v)
Calculate the division of Dimensionless and Frequency, which results in a Duration scalar.
|
LinearDensity |
divideBy(Length v)
Calculate the division of Dimensionless and Length, which results in a LinearDensity scalar.
|
Length |
divideBy(LinearDensity v)
Calculate the division of Dimensionless and LinearDensity, which results in a Length scalar.
|
Dimensionless |
exp()
Set the value(s) to Euler's number e raised to the power of the value(s).
|
Dimensionless |
expm1()
Set the value(s) to Euler's number e raised to the power of the value(s) minus 1 (e^x - 1).
|
Dimensionless |
instantiateRel(double value,
DimensionlessUnit unit)
Construct a new Relative Immutable DoubleScalar of the right type.
|
static Dimensionless |
interpolate(Dimensionless zero,
Dimensionless one,
double ratio)
Interpolate between two values.
|
Dimensionless |
inv()
Set the value(s) to the complement (1.0/x) of the value(s).
|
Dimensionless |
log()
Set the value(s) to the natural logarithm (base e) of the value(s).
|
Dimensionless |
log10()
Set the value(s) to the base 10 logarithm of the value(s).
|
Dimensionless |
log1p()
Set the value(s) to the natural logarithm of the sum of the value(s) and 1.
|
static Dimensionless |
max(Dimensionless r1,
Dimensionless r2)
Return the maximum value of two relative scalars.
|
static Dimensionless |
max(Dimensionless r1,
Dimensionless r2,
Dimensionless... rn)
Return the maximum value of more than two relative scalars.
|
static Dimensionless |
min(Dimensionless r1,
Dimensionless r2)
Return the minimum value of two relative scalars.
|
static Dimensionless |
min(Dimensionless r1,
Dimensionless r2,
Dimensionless... rn)
Return the minimum value of more than two relative scalars.
|
Acceleration |
multiplyBy(Acceleration v)
Calculate the multiplication of Dimensionless and Acceleration, which results in a Acceleration scalar.
|
Angle |
multiplyBy(Angle v)
Calculate the multiplication of Dimensionless and Angle, which results in a Angle scalar.
|
AngleSolid |
multiplyBy(AngleSolid v)
Calculate the multiplication of Dimensionless and AngleSolid, which results in a AngleSolid scalar.
|
Area |
multiplyBy(Area v)
Calculate the multiplication of Dimensionless and Area, which results in a Area scalar.
|
Density |
multiplyBy(Density v)
Calculate the multiplication of Dimensionless and Density, which results in a Density scalar.
|
Dimensionless |
multiplyBy(Dimensionless v)
Calculate the multiplication of Dimensionless and Dimensionless, which results in a Dimensionless scalar.
|
Duration |
multiplyBy(Duration v)
Calculate the multiplication of Dimensionless and Duration, which results in a Duration scalar.
|
ElectricalCharge |
multiplyBy(ElectricalCharge v)
Calculate the multiplication of Dimensionless and ElectricalCharge, which results in a ElectricalCharge scalar.
|
ElectricalCurrent |
multiplyBy(ElectricalCurrent v)
Calculate the multiplication of Dimensionless and ElectricalCurrent, which results in a ElectricalCurrent scalar.
|
ElectricalPotential |
multiplyBy(ElectricalPotential v)
Calculate the multiplication of Dimensionless and ElectricalPotential, which results in a ElectricalPotential scalar.
|
ElectricalResistance |
multiplyBy(ElectricalResistance v)
Calculate the multiplication of Dimensionless and ElectricalResistance, which results in a ElectricalResistance scalar.
|
Energy |
multiplyBy(Energy v)
Calculate the multiplication of Dimensionless and Energy, which results in a Energy scalar.
|
FlowMass |
multiplyBy(FlowMass v)
Calculate the multiplication of Dimensionless and FlowMass, which results in a FlowMass scalar.
|
FlowVolume |
multiplyBy(FlowVolume v)
Calculate the multiplication of Dimensionless and FlowVolume, which results in a FlowVolume scalar.
|
Force |
multiplyBy(Force v)
Calculate the multiplication of Dimensionless and Force, which results in a Force scalar.
|
Frequency |
multiplyBy(Frequency v)
Calculate the multiplication of Dimensionless and Frequency, which results in a Frequency scalar.
|
Length |
multiplyBy(Length v)
Calculate the multiplication of Dimensionless and Length, which results in a Length scalar.
|
LinearDensity |
multiplyBy(LinearDensity v)
Calculate the multiplication of Dimensionless and LinearDensity, which results in a LinearDensity scalar.
|
Mass |
multiplyBy(Mass v)
Calculate the multiplication of Dimensionless and Mass, which results in a Mass scalar.
|
Money |
multiplyBy(Money v)
Calculate the multiplication of Dimensionless and Money, which results in a Money scalar.
|
MoneyPerArea |
multiplyBy(MoneyPerArea v)
Calculate the multiplication of Dimensionless and MoneyPerArea, which results in a MoneyPerArea scalar.
|
MoneyPerDuration |
multiplyBy(MoneyPerDuration v)
Calculate the multiplication of Dimensionless and MoneyPerDuration, which results in a MoneyPerDuration scalar.
|
MoneyPerEnergy |
multiplyBy(MoneyPerEnergy v)
Calculate the multiplication of Dimensionless and MoneyPerEnergy, which results in a MoneyPerEnergy scalar.
|
MoneyPerLength |
multiplyBy(MoneyPerLength v)
Calculate the multiplication of Dimensionless and MoneyPerLength, which results in a MoneyPerLength scalar.
|
MoneyPerMass |
multiplyBy(MoneyPerMass v)
Calculate the multiplication of Dimensionless and MoneyPerMass, which results in a MoneyPerMass scalar.
|
MoneyPerVolume |
multiplyBy(MoneyPerVolume v)
Calculate the multiplication of Dimensionless and MoneyPerVolume, which results in a MoneyPerVolume scalar.
|
Power |
multiplyBy(Power v)
Calculate the multiplication of Dimensionless and Power, which results in a Power scalar.
|
Pressure |
multiplyBy(Pressure v)
Calculate the multiplication of Dimensionless and Pressure, which results in a Pressure scalar.
|
Speed |
multiplyBy(Speed v)
Calculate the multiplication of Dimensionless and Speed, which results in a Speed scalar.
|
Temperature |
multiplyBy(Temperature v)
Calculate the multiplication of Dimensionless and Temperature, which results in a Temperature scalar.
|
Torque |
multiplyBy(Torque v)
Calculate the multiplication of Dimensionless and Torque, which results in a Torque scalar.
|
Volume |
multiplyBy(Volume v)
Calculate the multiplication of Dimensionless and Volume, which results in a Volume scalar.
|
Dimensionless |
pow(double x)
Set the value(s) to the value(s) raised to the power of the argument.
|
Dimensionless |
signum()
Set the value(s) to the signum function of the value(s); zero if the argument is zero, 1.0 if the argument is greater
than zero, -1.0 if the argument is less than zero.
|
Dimensionless |
sin()
Set the value(s) to the trigonometric sine of the value(s).
|
Dimensionless |
sinh()
Set the value(s) to the hyperbolic sine of the value(s).
|
Dimensionless |
sqrt()
Set the value(s) to the correctly rounded positive square root of the value(s).
|
Dimensionless |
tan()
Set the value(s) to the trigonometric tangent of the value(s).
|
Dimensionless |
tanh()
Set the value(s) to the hyperbolic tangent of the value(s).
|
static Dimensionless |
valueOf(String text)
Returns a Dimensionless representation of a textual representation of a value with a unit.
|
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, stringOf, stringOfDefaultLocale, textualStringOf, textualStringOfDefaultLocale
byteValue, shortValue
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
neg
DIV, MULT, POW
public static final Dimensionless ZERO
public static final Dimensionless NaN
public static final Dimensionless POSITIVE_INFINITY
public static final Dimensionless NEGATIVE_INFINITY
public static final Dimensionless POS_MAXVALUE
public static final Dimensionless NEG_MAXVALUE
public Dimensionless(double value, DimensionlessUnit unit)
value
- double valueunit
- unit for the double valuepublic Dimensionless(Dimensionless value)
value
- Scalar from which to construct this instancepublic final Dimensionless instantiateRel(double value, DimensionlessUnit unit)
instantiateRel
in class AbstractDoubleScalarRel<DimensionlessUnit,Dimensionless>
value
- double; the double valueunit
- U; the unitpublic static final Dimensionless createSI(double value)
value
- double value in SI unitspublic static Dimensionless interpolate(Dimensionless zero, Dimensionless one, double ratio)
zero
- the low valueone
- the high valueratio
- the ratio between 0 and 1, inclusivepublic static Dimensionless max(Dimensionless r1, Dimensionless r2)
r1
- the first scalarr2
- the second scalarpublic static Dimensionless max(Dimensionless r1, Dimensionless r2, Dimensionless... rn)
r1
- the first scalarr2
- the second scalarrn
- the other scalarspublic static Dimensionless min(Dimensionless r1, Dimensionless r2)
r1
- the first scalarr2
- the second scalarpublic static Dimensionless min(Dimensionless r1, Dimensionless r2, Dimensionless... rn)
r1
- the first scalarr2
- the second scalarrn
- the other scalarspublic static Dimensionless valueOf(String text) throws IllegalArgumentException
text
- String; the textual representation to parse into a DimensionlessIllegalArgumentException
- when the text cannot be parsedpublic final Dimensionless acos()
acos
in interface MathFunctionsDimensionless<Dimensionless>
public final Dimensionless asin()
asin
in interface MathFunctionsDimensionless<Dimensionless>
public final Dimensionless atan()
atan
in interface MathFunctionsDimensionless<Dimensionless>
public final Dimensionless cbrt()
cbrt
in interface MathFunctionsDimensionless<Dimensionless>
public final Dimensionless cos()
cos
in interface MathFunctionsDimensionless<Dimensionless>
public final Dimensionless cosh()
cosh
in interface MathFunctionsDimensionless<Dimensionless>
public final Dimensionless exp()
exp
in interface MathFunctionsDimensionless<Dimensionless>
public final Dimensionless expm1()
expm1
in interface MathFunctionsDimensionless<Dimensionless>
public final Dimensionless log()
log
in interface MathFunctionsDimensionless<Dimensionless>
public final Dimensionless log10()
log10
in interface MathFunctionsDimensionless<Dimensionless>
public final Dimensionless log1p()
log1p
in interface MathFunctionsDimensionless<Dimensionless>
public final Dimensionless pow(double x)
pow
in interface MathFunctionsDimensionless<Dimensionless>
x
- double; the value to use as the powerpublic final Dimensionless signum()
signum
in interface MathFunctionsDimensionless<Dimensionless>
public final Dimensionless sin()
sin
in interface MathFunctionsDimensionless<Dimensionless>
public final Dimensionless sinh()
sinh
in interface MathFunctionsDimensionless<Dimensionless>
public final Dimensionless sqrt()
sqrt
in interface MathFunctionsDimensionless<Dimensionless>
public final Dimensionless tan()
tan
in interface MathFunctionsDimensionless<Dimensionless>
public final Dimensionless tanh()
tanh
in interface MathFunctionsDimensionless<Dimensionless>
public final Dimensionless inv()
inv
in interface MathFunctionsDimensionless<Dimensionless>
public final Dimensionless divideBy(Dimensionless v)
v
- Dimensionless scalarpublic final Acceleration multiplyBy(Acceleration v)
v
- Dimensionless scalarpublic final Angle multiplyBy(Angle v)
v
- Dimensionless scalarpublic final AngleSolid multiplyBy(AngleSolid v)
v
- Dimensionless scalarpublic final Area multiplyBy(Area v)
v
- Dimensionless scalarpublic final Density multiplyBy(Density v)
v
- Dimensionless scalarpublic final Dimensionless multiplyBy(Dimensionless v)
v
- Dimensionless scalarpublic final ElectricalCharge multiplyBy(ElectricalCharge v)
v
- Dimensionless scalarpublic final ElectricalCurrent multiplyBy(ElectricalCurrent v)
v
- Dimensionless scalarpublic final ElectricalPotential multiplyBy(ElectricalPotential v)
v
- Dimensionless scalarpublic final ElectricalResistance multiplyBy(ElectricalResistance v)
v
- Dimensionless scalarpublic final Energy multiplyBy(Energy v)
v
- Dimensionless scalarpublic final FlowMass multiplyBy(FlowMass v)
v
- Dimensionless scalarpublic final FlowVolume multiplyBy(FlowVolume v)
v
- Dimensionless scalarpublic final Force multiplyBy(Force v)
v
- Dimensionless scalarpublic final Frequency multiplyBy(Frequency v)
v
- Dimensionless scalarpublic final Length multiplyBy(Length v)
v
- Dimensionless scalarpublic final LinearDensity multiplyBy(LinearDensity v)
v
- Dimensionless scalarpublic final Mass multiplyBy(Mass v)
v
- Dimensionless scalarpublic final Money multiplyBy(Money v)
v
- Dimensionless scalarpublic final MoneyPerArea multiplyBy(MoneyPerArea v)
v
- Dimensionless scalarpublic final MoneyPerEnergy multiplyBy(MoneyPerEnergy v)
v
- Dimensionless scalarpublic final MoneyPerLength multiplyBy(MoneyPerLength v)
v
- Dimensionless scalarpublic final MoneyPerMass multiplyBy(MoneyPerMass v)
v
- Dimensionless scalarpublic final MoneyPerDuration multiplyBy(MoneyPerDuration v)
v
- Dimensionless scalarpublic final MoneyPerVolume multiplyBy(MoneyPerVolume v)
v
- Dimensionless scalarpublic final Power multiplyBy(Power v)
v
- Dimensionless scalarpublic final Pressure multiplyBy(Pressure v)
v
- Dimensionless scalarpublic final Speed multiplyBy(Speed v)
v
- Dimensionless scalarpublic final Temperature multiplyBy(Temperature v)
v
- Dimensionless scalarpublic final Duration multiplyBy(Duration v)
v
- Dimensionless scalarpublic final Torque multiplyBy(Torque v)
v
- Dimensionless scalarpublic final Volume multiplyBy(Volume v)
v
- Dimensionless scalarpublic final LinearDensity divideBy(Length v)
v
- Dimensionless scalarpublic final Length divideBy(LinearDensity v)
v
- Dimensionless scalarpublic final Frequency divideBy(Duration v)
v
- Dimensionless scalarCopyright © 2015–2019 Delft University of Technology. All rights reserved.