Table of Contents

Struct Speed

Namespace
UnitsNet
Assembly
UnitsNet.Speed.dll

In everyday use and in kinematics, the speed of an object is the magnitude of its velocity (the rate of change of its position); it is thus a scalar quantity.[1] The average speed of an object in an interval of time is the distance travelled by the object divided by the duration of the interval;[2] the instantaneous speed is the limit of the average speed as the duration of the time interval approaches zero.

public struct Speed

Constructors

Speed(double, SpeedUnit)

Creates the quantity with the given numeric value and unit.

public Speed(double value, SpeedUnit unit)

Parameters

value double

The numeric value to construct this quantity with.

unit SpeedUnit

The unit representation to construct this quantity with.

Exceptions

ArgumentException

If value is NaN or Infinity.

Properties

BaseUnit

The base unit of Speed, which is Second. All conversions go via this value.

public static SpeedUnit BaseUnit { get; }

Property Value

SpeedUnit

CentimetersPerHour

Gets a double value of this quantity converted into CentimeterPerHour

public double CentimetersPerHour { get; }

Property Value

double

CentimetersPerMinutes

Gets a double value of this quantity converted into CentimeterPerMinute

public double CentimetersPerMinutes { get; }

Property Value

double

CentimetersPerSecond

Gets a double value of this quantity converted into CentimeterPerSecond

public double CentimetersPerSecond { get; }

Property Value

double

DecimetersPerMinutes

Gets a double value of this quantity converted into DecimeterPerMinute

public double DecimetersPerMinutes { get; }

Property Value

double

DecimetersPerSecond

Gets a double value of this quantity converted into DecimeterPerSecond

public double DecimetersPerSecond { get; }

Property Value

double

FeetPerHour

Gets a double value of this quantity converted into FootPerHour

public double FeetPerHour { get; }

Property Value

double

FeetPerMinute

Gets a double value of this quantity converted into FootPerMinute

public double FeetPerMinute { get; }

Property Value

double

FeetPerSecond

Gets a double value of this quantity converted into FootPerSecond

public double FeetPerSecond { get; }

Property Value

double

InchesPerHour

Gets a double value of this quantity converted into InchPerHour

public double InchesPerHour { get; }

Property Value

double

InchesPerMinute

Gets a double value of this quantity converted into InchPerMinute

public double InchesPerMinute { get; }

Property Value

double

InchesPerSecond

Gets a double value of this quantity converted into InchPerSecond

public double InchesPerSecond { get; }

Property Value

double

KilometersPerHour

Gets a double value of this quantity converted into KilometerPerHour

public double KilometersPerHour { get; }

Property Value

double

KilometersPerMinutes

Gets a double value of this quantity converted into KilometerPerMinute

public double KilometersPerMinutes { get; }

Property Value

double

KilometersPerSecond

Gets a double value of this quantity converted into KilometerPerSecond

public double KilometersPerSecond { get; }

Property Value

double

Knots

Gets a double value of this quantity converted into Knot

public double Knots { get; }

Property Value

double

Mach

Gets a double value of this quantity converted into Mach

public double Mach { get; }

Property Value

double

MaxValue

Represents the largest possible value of Speed.

public static Speed MaxValue { get; }

Property Value

Speed

MetersPerHour

Gets a double value of this quantity converted into MeterPerHour

public double MetersPerHour { get; }

Property Value

double

MetersPerMinutes

Gets a double value of this quantity converted into MeterPerMinute

public double MetersPerMinutes { get; }

Property Value

double

MetersPerSecond

Gets a double value of this quantity converted into MeterPerSecond

public double MetersPerSecond { get; }

Property Value

double

MicrometersPerMinutes

Gets a double value of this quantity converted into MicrometerPerMinute

public double MicrometersPerMinutes { get; }

Property Value

double

MicrometersPerSecond

Gets a double value of this quantity converted into MicrometerPerSecond

public double MicrometersPerSecond { get; }

Property Value

double

MilesPerHour

Gets a double value of this quantity converted into MilePerHour

public double MilesPerHour { get; }

Property Value

double

MillimetersPerHour

Gets a double value of this quantity converted into MillimeterPerHour

public double MillimetersPerHour { get; }

Property Value

double

MillimetersPerMinutes

Gets a double value of this quantity converted into MillimeterPerMinute

public double MillimetersPerMinutes { get; }

Property Value

double

MillimetersPerSecond

Gets a double value of this quantity converted into MillimeterPerSecond

public double MillimetersPerSecond { get; }

Property Value

double

MinValue

Represents the smallest possible value of Speed.

public static Speed MinValue { get; }

Property Value

Speed

NanometersPerMinutes

Gets a double value of this quantity converted into NanometerPerMinute

public double NanometersPerMinutes { get; }

Property Value

double

NanometersPerSecond

Gets a double value of this quantity converted into NanometerPerSecond

public double NanometersPerSecond { get; }

Property Value

double

Unit

public SpeedUnit Unit { get; }

Property Value

SpeedUnit

UsSurveyFeetPerHour

Gets a double value of this quantity converted into UsSurveyFootPerHour

public double UsSurveyFeetPerHour { get; }

Property Value

double

UsSurveyFeetPerMinute

Gets a double value of this quantity converted into UsSurveyFootPerMinute

public double UsSurveyFeetPerMinute { get; }

Property Value

double

UsSurveyFeetPerSecond

Gets a double value of this quantity converted into UsSurveyFootPerSecond

public double UsSurveyFeetPerSecond { get; }

Property Value

double

Value

The numeric value this quantity was constructed with.

public double Value { get; }

Property Value

double

YardsPerHour

Gets a double value of this quantity converted into YardPerHour

public double YardsPerHour { get; }

Property Value

double

YardsPerMinute

Gets a double value of this quantity converted into YardPerMinute

public double YardsPerMinute { get; }

Property Value

double

YardsPerSecond

Gets a double value of this quantity converted into YardPerSecond

public double YardsPerSecond { get; }

Property Value

double

Zero

Gets an instance of this quantity with a value of 0 in the base unit Second.

public static Speed Zero { get; }

Property Value

Speed

Methods

As(SpeedUnit)

Convert to the unit representation unit.

public double As(SpeedUnit unit)

Parameters

unit SpeedUnit

Returns

double

Value converted to the specified unit.

From(double, SpeedUnit)

Dynamically convert from value and unit enum SpeedUnit to Speed.

public static Speed From(double value, SpeedUnit fromUnit)

Parameters

value double

Value to convert from.

fromUnit SpeedUnit

Unit to convert from.

Returns

Speed

Speed unit value.

FromCentimetersPerHour(double)

Creates a Speed from CentimeterPerHour.

public static Speed FromCentimetersPerHour(double centimetersperhour)

Parameters

centimetersperhour double

Returns

Speed

Exceptions

ArgumentException

If value is NaN or Infinity.

FromCentimetersPerMinutes(double)

Creates a Speed from CentimeterPerMinute.

public static Speed FromCentimetersPerMinutes(double centimetersperminutes)

Parameters

centimetersperminutes double

Returns

Speed

Exceptions

ArgumentException

If value is NaN or Infinity.

FromCentimetersPerSecond(double)

Creates a Speed from CentimeterPerSecond.

public static Speed FromCentimetersPerSecond(double centimeterspersecond)

Parameters

centimeterspersecond double

Returns

Speed

Exceptions

ArgumentException

If value is NaN or Infinity.

FromDecimetersPerMinutes(double)

Creates a Speed from DecimeterPerMinute.

public static Speed FromDecimetersPerMinutes(double decimetersperminutes)

Parameters

decimetersperminutes double

Returns

Speed

Exceptions

ArgumentException

If value is NaN or Infinity.

FromDecimetersPerSecond(double)

Creates a Speed from DecimeterPerSecond.

public static Speed FromDecimetersPerSecond(double decimeterspersecond)

Parameters

decimeterspersecond double

Returns

Speed

Exceptions

ArgumentException

If value is NaN or Infinity.

FromFeetPerHour(double)

Creates a Speed from FootPerHour.

public static Speed FromFeetPerHour(double feetperhour)

Parameters

feetperhour double

Returns

Speed

Exceptions

ArgumentException

If value is NaN or Infinity.

FromFeetPerMinute(double)

Creates a Speed from FootPerMinute.

public static Speed FromFeetPerMinute(double feetperminute)

Parameters

feetperminute double

Returns

Speed

Exceptions

ArgumentException

If value is NaN or Infinity.

FromFeetPerSecond(double)

Creates a Speed from FootPerSecond.

public static Speed FromFeetPerSecond(double feetpersecond)

Parameters

feetpersecond double

Returns

Speed

Exceptions

ArgumentException

If value is NaN or Infinity.

FromInchesPerHour(double)

Creates a Speed from InchPerHour.

public static Speed FromInchesPerHour(double inchesperhour)

Parameters

inchesperhour double

Returns

Speed

Exceptions

ArgumentException

If value is NaN or Infinity.

FromInchesPerMinute(double)

Creates a Speed from InchPerMinute.

public static Speed FromInchesPerMinute(double inchesperminute)

Parameters

inchesperminute double

Returns

Speed

Exceptions

ArgumentException

If value is NaN or Infinity.

FromInchesPerSecond(double)

Creates a Speed from InchPerSecond.

public static Speed FromInchesPerSecond(double inchespersecond)

Parameters

inchespersecond double

Returns

Speed

Exceptions

ArgumentException

If value is NaN or Infinity.

FromKilometersPerHour(double)

Creates a Speed from KilometerPerHour.

public static Speed FromKilometersPerHour(double kilometersperhour)

Parameters

kilometersperhour double

Returns

Speed

Exceptions

ArgumentException

If value is NaN or Infinity.

FromKilometersPerMinutes(double)

Creates a Speed from KilometerPerMinute.

public static Speed FromKilometersPerMinutes(double kilometersperminutes)

Parameters

kilometersperminutes double

Returns

Speed

Exceptions

ArgumentException

If value is NaN or Infinity.

FromKilometersPerSecond(double)

Creates a Speed from KilometerPerSecond.

public static Speed FromKilometersPerSecond(double kilometerspersecond)

Parameters

kilometerspersecond double

Returns

Speed

Exceptions

ArgumentException

If value is NaN or Infinity.

FromKnots(double)

Creates a Speed from Knot.

public static Speed FromKnots(double knots)

Parameters

knots double

Returns

Speed

Exceptions

ArgumentException

If value is NaN or Infinity.

FromMach(double)

Creates a Speed from Mach.

public static Speed FromMach(double mach)

Parameters

mach double

Returns

Speed

Exceptions

ArgumentException

If value is NaN or Infinity.

FromMetersPerHour(double)

Creates a Speed from MeterPerHour.

public static Speed FromMetersPerHour(double metersperhour)

Parameters

metersperhour double

Returns

Speed

Exceptions

ArgumentException

If value is NaN or Infinity.

FromMetersPerMinutes(double)

Creates a Speed from MeterPerMinute.

public static Speed FromMetersPerMinutes(double metersperminutes)

Parameters

metersperminutes double

Returns

Speed

Exceptions

ArgumentException

If value is NaN or Infinity.

FromMetersPerSecond(double)

Creates a Speed from MeterPerSecond.

public static Speed FromMetersPerSecond(double meterspersecond)

Parameters

meterspersecond double

Returns

Speed

Exceptions

ArgumentException

If value is NaN or Infinity.

FromMicrometersPerMinutes(double)

Creates a Speed from MicrometerPerMinute.

public static Speed FromMicrometersPerMinutes(double micrometersperminutes)

Parameters

micrometersperminutes double

Returns

Speed

Exceptions

ArgumentException

If value is NaN or Infinity.

FromMicrometersPerSecond(double)

Creates a Speed from MicrometerPerSecond.

public static Speed FromMicrometersPerSecond(double micrometerspersecond)

Parameters

micrometerspersecond double

Returns

Speed

Exceptions

ArgumentException

If value is NaN or Infinity.

FromMilesPerHour(double)

Creates a Speed from MilePerHour.

public static Speed FromMilesPerHour(double milesperhour)

Parameters

milesperhour double

Returns

Speed

Exceptions

ArgumentException

If value is NaN or Infinity.

FromMillimetersPerHour(double)

Creates a Speed from MillimeterPerHour.

public static Speed FromMillimetersPerHour(double millimetersperhour)

Parameters

millimetersperhour double

Returns

Speed

Exceptions

ArgumentException

If value is NaN or Infinity.

FromMillimetersPerMinutes(double)

Creates a Speed from MillimeterPerMinute.

public static Speed FromMillimetersPerMinutes(double millimetersperminutes)

Parameters

millimetersperminutes double

Returns

Speed

Exceptions

ArgumentException

If value is NaN or Infinity.

FromMillimetersPerSecond(double)

Creates a Speed from MillimeterPerSecond.

public static Speed FromMillimetersPerSecond(double millimeterspersecond)

Parameters

millimeterspersecond double

Returns

Speed

Exceptions

ArgumentException

If value is NaN or Infinity.

FromNanometersPerMinutes(double)

Creates a Speed from NanometerPerMinute.

public static Speed FromNanometersPerMinutes(double nanometersperminutes)

Parameters

nanometersperminutes double

Returns

Speed

Exceptions

ArgumentException

If value is NaN or Infinity.

FromNanometersPerSecond(double)

Creates a Speed from NanometerPerSecond.

public static Speed FromNanometersPerSecond(double nanometerspersecond)

Parameters

nanometerspersecond double

Returns

Speed

Exceptions

ArgumentException

If value is NaN or Infinity.

FromUsSurveyFeetPerHour(double)

Creates a Speed from UsSurveyFootPerHour.

public static Speed FromUsSurveyFeetPerHour(double ussurveyfeetperhour)

Parameters

ussurveyfeetperhour double

Returns

Speed

Exceptions

ArgumentException

If value is NaN or Infinity.

FromUsSurveyFeetPerMinute(double)

Creates a Speed from UsSurveyFootPerMinute.

public static Speed FromUsSurveyFeetPerMinute(double ussurveyfeetperminute)

Parameters

ussurveyfeetperminute double

Returns

Speed

Exceptions

ArgumentException

If value is NaN or Infinity.

FromUsSurveyFeetPerSecond(double)

Creates a Speed from UsSurveyFootPerSecond.

public static Speed FromUsSurveyFeetPerSecond(double ussurveyfeetpersecond)

Parameters

ussurveyfeetpersecond double

Returns

Speed

Exceptions

ArgumentException

If value is NaN or Infinity.

FromYardsPerHour(double)

Creates a Speed from YardPerHour.

public static Speed FromYardsPerHour(double yardsperhour)

Parameters

yardsperhour double

Returns

Speed

Exceptions

ArgumentException

If value is NaN or Infinity.

FromYardsPerMinute(double)

Creates a Speed from YardPerMinute.

public static Speed FromYardsPerMinute(double yardsperminute)

Parameters

yardsperminute double

Returns

Speed

Exceptions

ArgumentException

If value is NaN or Infinity.

FromYardsPerSecond(double)

Creates a Speed from YardPerSecond.

public static Speed FromYardsPerSecond(double yardspersecond)

Parameters

yardspersecond double

Returns

Speed

Exceptions

ArgumentException

If value is NaN or Infinity.

ToUnit(SpeedUnit)

Converts this Speed to another Speed with the unit representation unit.

public Speed ToUnit(SpeedUnit unit)

Parameters

unit SpeedUnit

Returns

Speed

A Speed with the specified unit.