9 #ifndef _TurtleBrains_Constants_h_
10 #define _TurtleBrains_Constants_h_
17 static const float kPi(3.14159265358979310f);
44 inline float DegreesToRadians(
const float degrees) {
return degrees *
kPi / 180.0f; }
49 inline float RadiansToDegrees(
const float radians) {
return radians * 180.0f /
kPi; }
56 inline float PoundsToKilograms(
const float pounds) {
return pounds *
kPoundsToKilograms; }
61 inline float KilogramsToPounds(
const float kilograms) {
return kilograms *
kKilogramsToPounds; }
68 inline float InchesToMeters(
const float inches) {
return inches *
kInchesToMeters; }
73 inline float FeetToMeters(
const float feet) {
return feet *
kFeetToMeters; };
78 inline float MetersToFeet(
const float meters) {
return meters *
kMetersToFeet; };
89 inline float KilometersToMiles(
const float kilometers) {
return kilometers *
kKilometersToMiles; }
96 inline float MileHourToMeterSecond(
const float mph) {
return mph / 2.2369362920544f; }
101 inline float MeterSecondToMileHour(
const float meterSec) {
return meterSec * 2.2369362920544f; }
106 inline float KilometerHourToMeterSecond(
const float kmh) {
return kmh / 3.6f; }
111 inline float MeterSecondToKilometerHour(
const float meterSecond) {
return meterSecond * 3.6f; }
130 inline float FahrenheitToCelsius(
const float fahrenheit) {
return (fahrenheit - 32.0f) / 1.8000f; }
135 inline float CelsiusToFahrenheit(
const float celsius) {
return (celsius * 1.8000f) + 32.0f; }
const float kPoundsToKilograms(0.45359237f)
A constant for the conversion of 1 pound (lb) to 1 kilogram (kg).
Contains objects and functions for dealing with Vector and Matrix math.
const float kKilogramsToPounds(1.0f/kPoundsToKilograms)
A constant for the conversion of 1 kilogram (kg) to 1 pound (lb).
const float kInchesToMeters(0.0254f)
A constant for the distance conversion of 1 inch to 1 meter.
const float kFeetToMeters(0.3048f)
A constant for the distance conversion from 1 foot to 1 meter.
static const float kTolerance(0.00001f)
Here is some information about the primary namespace.
Definition: tb_application_dialog.h:21
const float kMetersToInches(1.0f/kInchesToMeters)
A constant for the distance conversion of 1 meter to 1 inch.
const float kMilesToKilometers(1.609344f)
A constant for the distance conversion from 1 mile to 1 kilometer.
static const float kTwoPi(kPi *2.0f)
A constant for Pi * 2 stored in a float.
const float kKilometersToMiles(1.0f/kMilesToKilometers)
A constant for the distance conversion from 1 kilometer to 1 mile.
const float kNewtonMetersToFootPounds(1.0f/kFootPoundsToNewtonMeters)
A constant for the torque conversion from Nm to ft-lbs.
const float kFootPoundsToNewtonMeters(0.73756214837f)
A constant for the torque in ft-lbs to Nm.
static const float kPi(3.14159265358979310f)
A constant for the mathematical concept of Pi stored in a float.
const float kMetersToFeet(1.0f/kFeetToMeters)
A constant for the distance conversion from 1 meter to 1 foot.