public class GradeScale extends Object implements Scale
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.
Constructor and Description |
---|
GradeScale(double conversionFactorToGrade)
Construct a Scale for transforming a slope as a grade, where 45 degrees is 1, and 90 degrees is infinite, to radians.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
double |
fromStandardUnit(double value)
Convert a value from an SI value to a value in the unit that uses this scale.
|
double |
getConversionFactorToGrade() |
int |
hashCode() |
boolean |
isBaseSIScale()
Return whether this is a base (SI) scale.
|
double |
toStandardUnit(double value)
Convert a value to an SI value using this scale.
|
public GradeScale(double conversionFactorToGrade)
conversionFactorToGrade
- double; the conversion factor by which this number has to be multiplied to convert it to
the standard (e.g., SI) unit.public final double toStandardUnit(double value)
toStandardUnit
in interface Scale
value
- double; the value to convertpublic final double fromStandardUnit(double value)
fromStandardUnit
in interface Scale
value
- double; the value to convertpublic final double getConversionFactorToGrade()
public final boolean isBaseSIScale()
isBaseSIScale
in interface Scale
Copyright © 2015–2019 Delft University of Technology. All rights reserved.