public void MetersToInternationalFeet(double meters, double internationalFeet) { Assert.Equal(internationalFeet, UnitConverters.MetersToInternationalFeet(meters)); }
public void MilesToKilometers(double miles, double km) { Assert.Equal(km, UnitConverters.MilesToKilometers(miles), 4); }
public override double ConvertFromBaseUnits(double unitsInKelvin) => UnitConverters.CelsiusToFahrenheit(UnitConverters.KelvinToCelsius(unitsInKelvin));
public void RadiansToDegrees(double rad, double deg) { Assert.Equal(deg, UnitConverters.RadiansToDegrees(rad), 4); }
public override double ConvertFromBaseUnits(double unitsInKelvin) => UnitConverters.KelvinToCelsius(unitsInKelvin);
public void USSurveyFeetToMeters(double usFeet, double meters) { Assert.Equal(meters, UnitConverters.USSurveyFeetToMeters(usFeet)); }
public void HectopascalsKilopascals(double hpa, double kpa) { Assert.Equal(kpa, UnitConverters.HectopascalsToKilopascals(hpa), 4); }
public override double ConvertToBaseUnits(double numberInOunces) => UnitConverters.PoundsToKilograms(numberInOunces / 16) * 1000;
public void PoundsToKilograms(double pounds, double kg) { Assert.Equal(kg, UnitConverters.PoundsToKilograms(pounds), 4); }
[InlineData(43.623409, -79.368683, 42.35866, -71.05674, 690.2032)] // toronto -> boston, ma public void CoordinatesToKilometers(double lat1, double lon1, double lat2, double lon2, double distance) { Assert.Equal(distance, UnitConverters.CoordinatesToKilometers(lat1, lon1, lat2, lon2), 4); }
public override double ConvertFromBaseUnits(double numberInGrams) => UnitConverters.KilogramsToPounds(numberInGrams / 1000) * 16;
public override double ConvertToBaseUnits(double unitInYards) => UnitConverters.InternationalFeetToMeters(unitInYards * 3);
public override double ConvertFromBaseUnits(double unitInMeters) => UnitConverters.MetersToInternationalFeet(unitInMeters) / 3;
public override double ConvertToBaseUnits(double unitsInFahrenheit) => UnitConverters.CelsiusToKelvin(UnitConverters.FahrenheitToCelsius(unitsInFahrenheit));
public void InternationalFeetToMeters(double internationalFeet, double meters) { Assert.Equal(meters, UnitConverters.InternationalFeetToMeters(internationalFeet)); }
public void PoundsToStones(double pounds, double stones) { Assert.Equal(stones, UnitConverters.PoundsToStones(pounds), 4); }
public void MetersToUSSurveyFeet(double meters, double usFeet) { Assert.Equal(usFeet, UnitConverters.MetersToUSSurveyFeet(meters)); }
public void StonesToPounds(double stones, double pounds) { Assert.Equal(pounds, UnitConverters.StonesToPounds(stones), 4); }
public void RadiansPerSecondToDegreesPerSecond(double radians, double degrees) { Assert.Equal(degrees, UnitConverters.RadiansPerSecondToDegreesPerSecond(radians), 4); }
public void KilogramsToPounds(double kg, double pounds) { Assert.Equal(pounds, UnitConverters.KilogramsToPounds(kg), 4); }
public void DegreesToRadians(double deg, double rad) { Assert.Equal(rad, UnitConverters.DegreesToRadians(deg), 4); }
public void AtmospheresToPascals(double atm, double pascal) => Assert.Equal(UnitConverters.AtmospheresToPascals(atm), pascal);
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { var temp = UnitConverters.KelvinToCelsius((double)value); return($"{temp:N2} °C"); }
public void PascalsToAtmospheres(double pascal, double atm) => Assert.Equal(UnitConverters.PascalsToAtmospheres(pascal), atm);
public override double ConvertToBaseUnits(double unitsInCelsius) => UnitConverters.CelsiusToKelvin(unitsInCelsius);
public EventRenderingOptions(UnitConverters converters) { this.Converters = converters; }
public void KilometersToMiles(double km, double miles) { Assert.Equal(miles, UnitConverters.KilometersToMiles(km), 4); }
/// <inheritdoc cref="Track.Track(UnitConverters, TrackType)"/> /// <param name="initialPoints"> /// A set of initial points to add into the point data collection. /// </param> public Track( UnitConverters converter, TrackType trackType, params (int Frame, int Bin, double Amplitude)[] initialPoints)