A Conversion class used to convert distances to other units. Also used to standardize units to inches in the internal calculation.
More...
#include <Conversion.h>
|
static float | standardize (float value, measurement value_type) |
| Converts any measured value to the standardized units used in this library.
|
|
static float | convertTo (float value, measurement output_type) |
| Converts a value in the standardized units used in this library to preferred units.
|
|
A Conversion class used to convert distances to other units. Also used to standardize units to inches in the internal calculation.
◆ measurement
An enumerated class of measurement types for conversion.
Enumerator |
---|
in | A measurement unit that is measured in inches.
|
ft | A measurement unit that is measured in feet.
|
yd | A measurement unit that is measured in yards.
|
m | A measurement unit that is measured in meters.
|
cm | A measurement unit that is measured in centimeters.
|
mm | A measurement unit that is measured in millimeters.
|
◆ convertTo()
float Conversion::convertTo |
( |
float |
value, |
|
|
measurement |
output_type |
|
) |
| |
|
static |
Converts a value in the standardized units used in this library to preferred units.
- Parameters
-
value | the numeric value |
output_type | the enum representing the desired output type of data |
◆ standardize()
float Conversion::standardize |
( |
float |
value, |
|
|
measurement |
value_type |
|
) |
| |
|
static |
Converts any measured value to the standardized units used in this library.
- Parameters
-
value | the numeric value |
value_type | the enum representing the type of input data |
The documentation for this class was generated from the following files: