public class StandardScale extends LinearScale
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
| Modifier and Type | Field and Description |
|---|---|
static StandardScale |
SCALE
a ready-to-use instance of the standard scale (they are all the same...).
|
| Constructor and Description |
|---|
StandardScale()
Construct a standard Scale without a transformation.
|
| Modifier and Type | Method and Description |
|---|---|
double |
fromStandardUnit(double value)
Convert a value from an SI value to a value in the unit that uses this scale.
|
boolean |
isBaseSIScale()
Return whether this is a base (SI) scale.
|
double |
toStandardUnit(double value)
Convert a value to an SI value using this scale.
|
equals, getConversionFactorToStandardUnit, hashCodepublic static final StandardScale SCALE
public StandardScale()
public final double toStandardUnit(double value)
toStandardUnit in interface ScaletoStandardUnit in class LinearScalevalue - double; the value to convertpublic final double fromStandardUnit(double value)
fromStandardUnit in interface ScalefromStandardUnit in class LinearScalevalue - double; the value to convertpublic final boolean isBaseSIScale()
isBaseSIScale in interface ScaleisBaseSIScale in class LinearScaleCopyright © 2015–2019 Delft University of Technology. All rights reserved.