public abstract class DoubleScalar extends Object
Copyright (c) 2015-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 26 jun, 2015
Modifier and Type | Class and Description |
---|---|
static class |
DoubleScalar.Abs<AU extends AbsoluteLinearUnit<AU,RU>,RU extends Unit<RU>>
Absolute Immutable DoubleScalar.
|
static class |
DoubleScalar.Rel<U extends Unit<U>>
Relative Immutable DoubleScalar.
|
Constructor and Description |
---|
DoubleScalar() |
Modifier and Type | Method and Description |
---|---|
static DoubleScalar.Rel<SIUnit> |
divide(AbstractDoubleScalarRel<?,?> left,
AbstractDoubleScalarRel<?,?> right)
Divide two values; the result is a new instance with a different (existing or generated) SI unit.
|
static <AU extends AbsoluteLinearUnit<AU,RU>,RU extends Unit<RU>,R extends AbstractDoubleScalarRel<RU,R>,A extends AbstractDoubleScalarAbs<AU,A,RU,R>> |
interpolate(A zero,
A one,
double ratio)
Interpolate between two values.
|
static <U extends Unit<U>,R extends AbstractDoubleScalarRel<U,R>> |
interpolate(R zero,
R one,
double ratio)
Interpolate between two values.
|
static <U extends Unit<U>,T extends AbstractDoubleScalar<U,T>> |
max(T r1,
T r2)
Return the maximum value of two relative scalars.
|
static <U extends Unit<U>,T extends AbstractDoubleScalar<U,T>> |
max(T r1,
T r2,
T... rn)
Return the maximum value of more than two relative scalars.
|
static <U extends Unit<U>,T extends AbstractDoubleScalar<U,T>> |
min(T r1,
T r2)
Return the minimum value of two relative scalars.
|
static <U extends Unit<U>,T extends AbstractDoubleScalar<U,T>> |
min(T r1,
T r2,
T... rn)
Return the minimum value of more than two relative scalars.
|
static <AU extends AbsoluteLinearUnit<AU,RU>,RU extends Unit<RU>,R extends AbstractDoubleScalarRel<RU,R>,A extends AbstractDoubleScalarAbs<AU,A,RU,R>> |
minus(A left,
A right)
Subtract two absolute values.
|
static <AU extends AbsoluteLinearUnit<AU,RU>,RU extends Unit<RU>,R extends AbstractDoubleScalarRel<RU,R>,A extends AbstractDoubleScalarAbs<AU,A,RU,R>> |
minus(A left,
R right)
Subtract a Relative value from an absolute value.
|
static <U extends Unit<U>,R extends AbstractDoubleScalarRel<U,R>> |
minus(R left,
R right)
Subtract a relative value from a relative value.
|
static DoubleScalar.Rel<SIUnit> |
multiply(AbstractDoubleScalarRel<?,?> left,
AbstractDoubleScalarRel<?,?> right)
Multiply two values; the result is a new instance with a different (existing or generated) SI unit.
|
static <AU extends AbsoluteLinearUnit<AU,RU>,RU extends Unit<RU>,R extends AbstractDoubleScalarRel<RU,R>,A extends AbstractDoubleScalarAbs<AU,A,RU,R>> |
plus(A left,
R right)
Add a Relative value to an Absolute value.
|
static <AU extends AbsoluteLinearUnit<AU,RU>,RU extends Unit<RU>,R extends AbstractDoubleScalarRel<RU,R>,A extends AbstractDoubleScalarAbs<AU,A,RU,R>> |
plus(R left,
A right)
Add an Absolute value to a Relative value.
|
static <U extends Unit<U>,R extends AbstractDoubleScalarRel<U,R>> |
plus(R left,
R right)
Add a Relative value to a Relative value.
|
public static <AU extends AbsoluteLinearUnit<AU,RU>,RU extends Unit<RU>,R extends AbstractDoubleScalarRel<RU,R>,A extends AbstractDoubleScalarAbs<AU,A,RU,R>> A plus(A left, R right)
AU
- Unit; the absolute unit of the parameters and the resultRU
- Unit; the relative unit of the parameters and the resultR
- the relative typeA
- the corresponding absolute typeleft
- A, an absolute typed DoubleScalar; the left argumentright
- R, a relative typed DoubleScalar; the right argumentpublic static <AU extends AbsoluteLinearUnit<AU,RU>,RU extends Unit<RU>,R extends AbstractDoubleScalarRel<RU,R>,A extends AbstractDoubleScalarAbs<AU,A,RU,R>> A plus(R left, A right)
AU
- Unit; the absolute unit of the parameters and the resultRU
- Unit; the relative unit of the parameters and the resultR
- the relative typeA
- the corresponding absolute typeleft
- A, an absolute typed DoubleScalar; the left argumentright
- R, a relative typed DoubleScalar; the right argumentpublic static <U extends Unit<U>,R extends AbstractDoubleScalarRel<U,R>> R plus(R left, R right)
U
- Unit; the unit of the parameters and the resultR
- the relative typeleft
- R, a relative typed DoubleScalar; the left argumentright
- R, a relative typed DoubleScalar; the right argumentpublic static <AU extends AbsoluteLinearUnit<AU,RU>,RU extends Unit<RU>,R extends AbstractDoubleScalarRel<RU,R>,A extends AbstractDoubleScalarAbs<AU,A,RU,R>> A minus(A left, R right)
AU
- Unit; the absolute unit of the parameters and the resultRU
- Unit; the relative unit of the parameters and the resultR
- the relative typeA
- the corresponding absolute typeleft
- A, an absolute typed DoubleScalar; the left valueright
- R, a relative typed DoubleScalar; the right valuepublic static <U extends Unit<U>,R extends AbstractDoubleScalarRel<U,R>> R minus(R left, R right)
U
- Unit; the unit of the parameters and the resultR
- the relative typeleft
- R, a relative typed DoubleScalar; the left valueright
- R, a relative typed DoubleScalar; the right valuepublic static <AU extends AbsoluteLinearUnit<AU,RU>,RU extends Unit<RU>,R extends AbstractDoubleScalarRel<RU,R>,A extends AbstractDoubleScalarAbs<AU,A,RU,R>> R minus(A left, A right)
AU
- Unit; the absolute unit of the parameters and the resultRU
- Unit; the relative unit of the parameters and the resultR
- the relative typeA
- the corresponding absolute typeleft
- A, an absolute typed DoubleScalar; value 1right
- A, an absolute typed DoubleScalar; value 2public static DoubleScalar.Rel<SIUnit> multiply(AbstractDoubleScalarRel<?,?> left, AbstractDoubleScalarRel<?,?> right)
left
- AbstractDoubleScalarRel<?, ?>; the left operandright
- AbstractDoubleScalarRel<?, ?>; the right operandpublic static DoubleScalar.Rel<SIUnit> divide(AbstractDoubleScalarRel<?,?> left, AbstractDoubleScalarRel<?,?> right)
left
- AbstractDoubleScalarRel<?, ?>; the left operandright
- AbstractDoubleScalarRel<?, ?>; the right operandpublic static <U extends Unit<U>,R extends AbstractDoubleScalarRel<U,R>> R interpolate(R zero, R one, double ratio)
U
- Unit; the unit of the parameters and the resultR
- the relative typezero
- R; the low valueone
- R; the high valueratio
- double; the ratio between 0 and 1, inclusivepublic static <AU extends AbsoluteLinearUnit<AU,RU>,RU extends Unit<RU>,R extends AbstractDoubleScalarRel<RU,R>,A extends AbstractDoubleScalarAbs<AU,A,RU,R>> A interpolate(A zero, A one, double ratio)
AU
- Unit; the absolute unit of the parameters and the resultRU
- Unit; the relative unit of the parameters and the resultR
- the relative typeA
- the corresponding absolute typezero
- A; the low valueone
- A; the high valueratio
- double; the ratio between 0 and 1, inclusivepublic static <U extends Unit<U>,T extends AbstractDoubleScalar<U,T>> T max(T r1, T r2)
U
- Unit; the unit of the parameters and the resultT
- the argument and result typer1
- T; the first scalarr2
- T; the second scalar@SafeVarargs public static <U extends Unit<U>,T extends AbstractDoubleScalar<U,T>> T max(T r1, T r2, T... rn)
U
- Unit; the unit of the parameters and the resultT
- the argument and result typer1
- T; the first scalarr2
- T; the second scalarrn
- T...; the other scalarspublic static <U extends Unit<U>,T extends AbstractDoubleScalar<U,T>> T min(T r1, T r2)
U
- Unit; the unit of the parameters and the resultT
- the argument and result typer1
- T; the first scalarr2
- T; the second scalar@SafeVarargs public static <U extends Unit<U>,T extends AbstractDoubleScalar<U,T>> T min(T r1, T r2, T... rn)
U
- Unit; the unit of the parameters and the resultT
- the argument and result typer1
- T; the first scalarr2
- T; the second scalarrn
- T...; the other scalarsCopyright © 2015–2019 Delft University of Technology. All rights reserved.