Class Conversions
- Namespace
- CodeBase
- Assembly
- 4Experience.CodeBase.Core.Runtime.dll
A helper class contains many independent and small methods with mathematical functions for conversion.
public static class Conversions
- Inheritance
-
Conversions
Fields
FULL_ANGLE
private const float FULL_ANGLE = 360
Field Value
HALF_ANGLE
private const float HALF_ANGLE = 180
Field Value
KILOMETERS_TO_MILES
private const float KILOMETERS_TO_MILES = 0.6213712
Field Value
METERS_PER_SECOND_TO_KILOMETERS_PER_HOUR
private const float METERS_PER_SECOND_TO_KILOMETERS_PER_HOUR = 3.6
Field Value
METERS_PER_SECOND_TO_KNOTS
private const float METERS_PER_SECOND_TO_KNOTS = 1.9438462
Field Value
METERS_TO_FEET
private const float METERS_TO_FEET = 3.28084
Field Value
MILES_PER_SECOND_TO_MILES_PER_HOUR
private const float MILES_PER_SECOND_TO_MILES_PER_HOUR = 2.23694
Field Value
TIME_SEPARATOR
private const string TIME_SEPARATOR = ":"
Field Value
Methods
AnglesAbove180DegreesToNegativeAngles(float)
E.g. for 190 degrees return will be equal to -170
public static float AnglesAbove180DegreesToNegativeAngles(float degrees)
Parameters
degreesfloat
Returns
DegreesToRadians(float)
public static float DegreesToRadians(float angle)
Parameters
anglefloat
Returns
FeetToMeters(float)
public static float FeetToMeters(float value)
Parameters
valuefloat
Returns
FeetsToMeters(float)
[Obsolete("Fixed typo - use FeetToMeters method instead - 25.10.2022")]
public static float FeetsToMeters(float value)
Parameters
valuefloat
Returns
KilometersPerHourToMetersPerSecond(float)
public static float KilometersPerHourToMetersPerSecond(float value)
Parameters
valuefloat
Returns
KilometersToMiles(float)
public static float KilometersToMiles(float value)
Parameters
valuefloat
Returns
KnotsToMetersPerSecond(float)
public static float KnotsToMetersPerSecond(float value)
Parameters
valuefloat
Returns
MegabyteValueToGigabyte(float)
public static float MegabyteValueToGigabyte(float value)
Parameters
valuefloat
Returns
MetersPerSecondToKilometersPerHour(float)
public static float MetersPerSecondToKilometersPerHour(float value)
Parameters
valuefloat
Returns
MetersPerSecondToKnots(float)
public static float MetersPerSecondToKnots(float value)
Parameters
valuefloat
Returns
MetersToFeet(float)
public static float MetersToFeet(float value)
Parameters
valuefloat
Returns
MetersToFeets(float)
[Obsolete("Fixed typo - use MetersToFeet method instead - 25.10.2022")]
public static float MetersToFeets(float value)
Parameters
valuefloat
Returns
MilesPerHourToMilesPerSecond(float)
public static float MilesPerHourToMilesPerSecond(float value)
Parameters
valuefloat
Returns
MilesPerSecondToMilesPerHour(float)
public static float MilesPerSecondToMilesPerHour(float value)
Parameters
valuefloat
Returns
MilesToKilometers(float)
public static float MilesToKilometers(float value)
Parameters
valuefloat
Returns
NormalizedValueToPercentage(float)
public static float NormalizedValueToPercentage(float value)
Parameters
valuefloat
Returns
PercentageToNormalizedValue(float)
public static float PercentageToNormalizedValue(float percent)
Parameters
percentfloat
Returns
SecondsValueToMinutesFormat(float)
Returns time in 00:00 string format
public static string SecondsValueToMinutesFormat(float seconds)
Parameters
secondsfloat