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
doubleThe numeric value to construct this quantity with.
unit
SpeedUnitThe 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
CentimetersPerHour
Gets a double value of this quantity converted into CentimeterPerHour
public double CentimetersPerHour { get; }
Property Value
CentimetersPerMinutes
Gets a double value of this quantity converted into CentimeterPerMinute
public double CentimetersPerMinutes { get; }
Property Value
CentimetersPerSecond
Gets a double value of this quantity converted into CentimeterPerSecond
public double CentimetersPerSecond { get; }
Property Value
DecimetersPerMinutes
Gets a double value of this quantity converted into DecimeterPerMinute
public double DecimetersPerMinutes { get; }
Property Value
DecimetersPerSecond
Gets a double value of this quantity converted into DecimeterPerSecond
public double DecimetersPerSecond { get; }
Property Value
FeetPerHour
Gets a double value of this quantity converted into FootPerHour
public double FeetPerHour { get; }
Property Value
FeetPerMinute
Gets a double value of this quantity converted into FootPerMinute
public double FeetPerMinute { get; }
Property Value
FeetPerSecond
Gets a double value of this quantity converted into FootPerSecond
public double FeetPerSecond { get; }
Property Value
InchesPerHour
Gets a double value of this quantity converted into InchPerHour
public double InchesPerHour { get; }
Property Value
InchesPerMinute
Gets a double value of this quantity converted into InchPerMinute
public double InchesPerMinute { get; }
Property Value
InchesPerSecond
Gets a double value of this quantity converted into InchPerSecond
public double InchesPerSecond { get; }
Property Value
KilometersPerHour
Gets a double value of this quantity converted into KilometerPerHour
public double KilometersPerHour { get; }
Property Value
KilometersPerMinutes
Gets a double value of this quantity converted into KilometerPerMinute
public double KilometersPerMinutes { get; }
Property Value
KilometersPerSecond
Gets a double value of this quantity converted into KilometerPerSecond
public double KilometersPerSecond { get; }
Property Value
Knots
public double Knots { get; }
Property Value
Mach
public double Mach { get; }
Property Value
MaxValue
Represents the largest possible value of Speed.
public static Speed MaxValue { get; }
Property Value
MetersPerHour
Gets a double value of this quantity converted into MeterPerHour
public double MetersPerHour { get; }
Property Value
MetersPerMinutes
Gets a double value of this quantity converted into MeterPerMinute
public double MetersPerMinutes { get; }
Property Value
MetersPerSecond
Gets a double value of this quantity converted into MeterPerSecond
public double MetersPerSecond { get; }
Property Value
MicrometersPerMinutes
Gets a double value of this quantity converted into MicrometerPerMinute
public double MicrometersPerMinutes { get; }
Property Value
MicrometersPerSecond
Gets a double value of this quantity converted into MicrometerPerSecond
public double MicrometersPerSecond { get; }
Property Value
MilesPerHour
Gets a double value of this quantity converted into MilePerHour
public double MilesPerHour { get; }
Property Value
MillimetersPerHour
Gets a double value of this quantity converted into MillimeterPerHour
public double MillimetersPerHour { get; }
Property Value
MillimetersPerMinutes
Gets a double value of this quantity converted into MillimeterPerMinute
public double MillimetersPerMinutes { get; }
Property Value
MillimetersPerSecond
Gets a double value of this quantity converted into MillimeterPerSecond
public double MillimetersPerSecond { get; }
Property Value
MinValue
Represents the smallest possible value of Speed.
public static Speed MinValue { get; }
Property Value
NanometersPerMinutes
Gets a double value of this quantity converted into NanometerPerMinute
public double NanometersPerMinutes { get; }
Property Value
NanometersPerSecond
Gets a double value of this quantity converted into NanometerPerSecond
public double NanometersPerSecond { get; }
Property Value
Unit
public SpeedUnit Unit { get; }
Property Value
UsSurveyFeetPerHour
Gets a double value of this quantity converted into UsSurveyFootPerHour
public double UsSurveyFeetPerHour { get; }
Property Value
UsSurveyFeetPerMinute
Gets a double value of this quantity converted into UsSurveyFootPerMinute
public double UsSurveyFeetPerMinute { get; }
Property Value
UsSurveyFeetPerSecond
Gets a double value of this quantity converted into UsSurveyFootPerSecond
public double UsSurveyFeetPerSecond { get; }
Property Value
Value
The numeric value this quantity was constructed with.
public double Value { get; }
Property Value
YardsPerHour
Gets a double value of this quantity converted into YardPerHour
public double YardsPerHour { get; }
Property Value
YardsPerMinute
Gets a double value of this quantity converted into YardPerMinute
public double YardsPerMinute { get; }
Property Value
YardsPerSecond
Gets a double value of this quantity converted into YardPerSecond
public double YardsPerSecond { get; }
Property Value
Zero
Gets an instance of this quantity with a value of 0 in the base unit Second.
public static Speed Zero { get; }
Property Value
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)
public static Speed From(double value, SpeedUnit fromUnit)
Parameters
Returns
- Speed
Speed unit value.
FromCentimetersPerHour(double)
Creates a Speed from CentimeterPerHour.
public static Speed FromCentimetersPerHour(double centimetersperhour)
Parameters
centimetersperhour
double
Returns
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
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
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
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
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
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
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
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
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
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
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
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
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
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromKnots(double)
public static Speed FromKnots(double knots)
Parameters
knots
double
Returns
Exceptions
- ArgumentException
If value is NaN or Infinity.
FromMach(double)
public static Speed FromMach(double mach)
Parameters
mach
double
Returns
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.