Table of Contents

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

float

HALF_ANGLE

private const float HALF_ANGLE = 180

Field Value

float

KILOMETERS_TO_MILES

private const float KILOMETERS_TO_MILES = 0.6213712

Field Value

float

METERS_PER_SECOND_TO_KILOMETERS_PER_HOUR

private const float METERS_PER_SECOND_TO_KILOMETERS_PER_HOUR = 3.6

Field Value

float

METERS_PER_SECOND_TO_KNOTS

private const float METERS_PER_SECOND_TO_KNOTS = 1.9438462

Field Value

float

METERS_TO_FEET

private const float METERS_TO_FEET = 3.28084

Field Value

float

MILES_PER_SECOND_TO_MILES_PER_HOUR

private const float MILES_PER_SECOND_TO_MILES_PER_HOUR = 2.23694

Field Value

float

TIME_SEPARATOR

private const string TIME_SEPARATOR = ":"

Field Value

string

Methods

AnglesAbove180DegreesToNegativeAngles(float)

E.g. for 190 degrees return will be equal to -170

public static float AnglesAbove180DegreesToNegativeAngles(float degrees)

Parameters

degrees float

Returns

float

DegreesToRadians(float)

public static float DegreesToRadians(float angle)

Parameters

angle float

Returns

float

FeetToMeters(float)

public static float FeetToMeters(float value)

Parameters

value float

Returns

float

FeetsToMeters(float)

[Obsolete("Fixed typo - use FeetToMeters method instead - 25.10.2022")]
public static float FeetsToMeters(float value)

Parameters

value float

Returns

float

KilometersPerHourToMetersPerSecond(float)

public static float KilometersPerHourToMetersPerSecond(float value)

Parameters

value float

Returns

float

KilometersToMiles(float)

public static float KilometersToMiles(float value)

Parameters

value float

Returns

float

KnotsToMetersPerSecond(float)

public static float KnotsToMetersPerSecond(float value)

Parameters

value float

Returns

float

MegabyteValueToGigabyte(float)

public static float MegabyteValueToGigabyte(float value)

Parameters

value float

Returns

float

MetersPerSecondToKilometersPerHour(float)

public static float MetersPerSecondToKilometersPerHour(float value)

Parameters

value float

Returns

float

MetersPerSecondToKnots(float)

public static float MetersPerSecondToKnots(float value)

Parameters

value float

Returns

float

MetersToFeet(float)

public static float MetersToFeet(float value)

Parameters

value float

Returns

float

MetersToFeets(float)

[Obsolete("Fixed typo - use MetersToFeet method instead - 25.10.2022")]
public static float MetersToFeets(float value)

Parameters

value float

Returns

float

MilesPerHourToMilesPerSecond(float)

public static float MilesPerHourToMilesPerSecond(float value)

Parameters

value float

Returns

float

MilesPerSecondToMilesPerHour(float)

public static float MilesPerSecondToMilesPerHour(float value)

Parameters

value float

Returns

float

MilesToKilometers(float)

public static float MilesToKilometers(float value)

Parameters

value float

Returns

float

NormalizedValueToPercentage(float)

public static float NormalizedValueToPercentage(float value)

Parameters

value float

Returns

float

PercentageToNormalizedValue(float)

public static float PercentageToNormalizedValue(float percent)

Parameters

percent float

Returns

float

SecondsValueToMinutesFormat(float)

Returns time in 00:00 string format

public static string SecondsValueToMinutesFormat(float seconds)

Parameters

seconds float

Returns

string