WPID Library 5
Loading...
Searching...
No Matches
Public Types | Static Public Member Functions | List of all members
wpid::Conversion Class Reference

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>

Public Types

enum class  measurement {
  in , ft , yd , m ,
  cm , mm
}
 An enumerated class of measurement types for conversion. More...
 

Static Public Member Functions

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.
 

Detailed Description

A Conversion class used to convert distances to other units. Also used to standardize units to inches in the internal calculation.

Member Enumeration Documentation

◆ measurement

enum class wpid::Conversion::measurement
strong

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.

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.

Member Function Documentation

◆ 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
valuethe numeric value
output_typethe 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
valuethe numeric value
value_typethe enum representing the type of input data

The documentation for this class was generated from the following files: