Running Manager  1.7
API for Running Manager (https://github.com/HWiman-ICONIC/running-manager)
Static Public Member Functions | List of all members
Converter Class Reference

Unit converter. More...

#include <Converter.h>

Static Public Member Functions

static double Convert (double const &distance, PTUnit const &from, PTUnit const &to)
 Convert from one distance to another. More...
 
static double GetKmPerMile ()
 Constant for converting km <-> miles. More...
 
static void Convert (ESpeedType const &from, ESpeedType const &to, int const &val1, int const &val2, int &outVal1, int &outVal2)
 Convert from ne speed to another. More...
 
static wxTimeSpan GetTime (double const &distance, wxTimeSpan const &pace, ESpeedType type)
 Get time duration of a specified distance, pace and speed type. More...
 

Detailed Description

Unit converter.

Member Function Documentation

◆ Convert() [1/2]

static double Converter::Convert ( double const &  distance,
PTUnit const &  from,
PTUnit const &  to 
)
static

Convert from one distance to another.

Parameters
distanceDistance in from unit
fromFrom unit
toTo unit
Returns
distance in to unit

◆ Convert() [2/2]

static void Converter::Convert ( ESpeedType const &  from,
ESpeedType const &  to,
int const &  val1,
int const &  val2,
int &  outVal1,
int &  outVal2 
)
static

Convert from ne speed to another.

Parameters
fromFrom this speed unit
toTo this speed unit
val1Input 1
val2Input 2
outVal1Output 1
outVal2Output 2

◆ GetKmPerMile()

static double Converter::GetKmPerMile ( )
static

Constant for converting km <-> miles.

Returns
Constant for converting km <-> miles

◆ GetTime()

static wxTimeSpan Converter::GetTime ( double const &  distance,
wxTimeSpan const &  pace,
ESpeedType  type 
)
static

Get time duration of a specified distance, pace and speed type.

Parameters
distanceDistance
pacePace
typeSpeec unit
Returns
Time duration

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