Class Speed
A Speed
Implements
Namespace: Scripting
Syntax
public class Speed : ISpeed
Constructors
Speed(Double)
Initializes a new instance of the Speed struct.
Declaration
public Speed(double speedInMetresPerSec)
Parameters
Type | Name | Description |
---|---|---|
System.Double | speedInMetresPerSec | The speed in metres per sec. |
Properties
InMetresPerSecond
Get the speed in metres per second
Declaration
public double InMetresPerSecond { get; }
Property Value
Type | Description |
---|---|
System.Double |
Methods
FromMetresPerSecond(Double)
Construct a new speed object from a value in metres per second
Declaration
public static Speed FromMetresPerSecond(double speed)
Parameters
Type | Name | Description |
---|---|---|
System.Double | speed | The speed. |
Returns
Type | Description |
---|---|
Speed | A speed object |
ToDouble()
Convert to a double
Declaration
public double ToDouble()
Returns
Type | Description |
---|---|
System.Double | The speed as a double |
ToString()
Returns a System.String that represents this instance.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A System.String that represents this instance. |
Overrides
System.Object.ToString()
Operators
Implicit(Speed to Double)
Performs an implicit conversion from Speed to System.Double.
Declaration
public static implicit operator double (Speed speed)
Parameters
Type | Name | Description |
---|---|---|
Speed | speed | The speed. |
Returns
Type | Description |
---|---|
System.Double | The result of the conversion. |