Class SingleExtensions
Extension methods for
Inheritance
Namespace: X10D.Math
Assembly: X10D.dll
Syntax
public static class SingleExtensions : object
Methods
| Improve this Doc View SourceAcos(Single)
Returns the arccosine of the specified value.
Declaration
public static float Acos(this float value)
Parameters
Type | Name | Description |
---|---|---|
System.Single | value | The value representing a cosine, which must be greater than or equal to -1, but less than or equal to 1. |
Returns
Type | Description |
---|---|
System.Single | The arccosine of |
Acosh(Single)
Returns the hyperbolic arccosine of the specified value.
Declaration
public static float Acosh(this float value)
Parameters
Type | Name | Description |
---|---|---|
System.Single | value | The value representing a hyperbolic cosine, which must be greater than or equal to 1, but less than or equal to
|
Returns
Type | Description |
---|---|
System.Single | The hyperbolic arccosine of |
Asin(Single)
Returns the arcsine of the specified value.
Declaration
public static float Asin(this float value)
Parameters
Type | Name | Description |
---|---|---|
System.Single | value | The value representing a sine, which must be greater than or equal to -1, but less than or equal to 1. |
Returns
Type | Description |
---|---|
System.Single | The arccosine of |
Asinh(Single)
Returns the hyperbolic arcsine of the specified value.
Declaration
public static float Asinh(this float value)
Parameters
Type | Name | Description |
---|---|---|
System.Single | value | The value representing a hyperbolic sine, which must be greater than or equal to 1, but less than or equal to
|
Returns
Type | Description |
---|---|
System.Single | The hyperbolic arccosine of |
Atan(Single)
Returns the arctangent of the specified value.
Declaration
public static float Atan(this float value)
Parameters
Type | Name | Description |
---|---|---|
System.Single | value | The value representing a tangent, which must be greater than or equal to -1, but less than or equal to 1. |
Returns
Type | Description |
---|---|
System.Single | The arctangent of |
Atanh(Single)
Returns the hyperbolic arctangent of the specified value.
Declaration
public static float Atanh(this float value)
Parameters
Type | Name | Description |
---|---|---|
System.Single | value | The value representing a hyperbolic tangent, which must be greater than or equal to 1, but less than or equal to
|
Returns
Type | Description |
---|---|
System.Single | The hyperbolic arctangent of |
ComplexSqrt(Single)
Returns the complex square root of this single-precision floating-point number.
Declaration
public static Complex ComplexSqrt(this float value)
Parameters
Type | Name | Description |
---|---|---|
System.Single | value | The number whose square root is to be found. |
Returns
Type | Description |
---|---|
Complex | The square root of |
Cos(Single)
Returns the cosine of the specified angle.
Declaration
public static float Cos(this float value)
Parameters
Type | Name | Description |
---|---|---|
System.Single | value | The angle, measured in radians. |
Returns
Type | Description |
---|---|
System.Single | The cosine of |
Cosh(Single)
Returns the hyperbolic cosine of the specified angle.
Declaration
public static float Cosh(this float value)
Parameters
Type | Name | Description |
---|---|---|
System.Single | value | The angle, measured in radians. |
Returns
Type | Description |
---|---|
System.Single | The hyperbolic cosine of |
DegreesToRadians(Single)
Converts the current angle in degrees to its equivalent represented in radians.
Declaration
public static float DegreesToRadians(this float value)
Parameters
Type | Name | Description |
---|---|---|
System.Single | value | The angle in degrees to convert. |
Returns
Type | Description |
---|---|
System.Single | The result of π * |
IsEven(Single)
Returns a value indicating whether the current value is evenly divisible by 2.
Declaration
public static bool IsEven(this float value)
Parameters
Type | Name | Description |
---|---|---|
System.Single | value | The value whose parity to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if |
IsOdd(Single)
Returns a value indicating whether the current value is not evenly divisible by 2.
Declaration
public static bool IsOdd(this float value)
Parameters
Type | Name | Description |
---|---|---|
System.Single | value | The value whose parity to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if |
RadiansToDegrees(Single)
Converts the current angle in radians to its equivalent represented in degrees.
Declaration
public static float RadiansToDegrees(this float value)
Parameters
Type | Name | Description |
---|---|---|
System.Single | value | The angle in radians to convert. |
Returns
Type | Description |
---|---|
System.Single | The result of π * |
Round(Single)
Rounds the current value to the nearest whole number.
Declaration
public static float Round(this float value)
Parameters
Type | Name | Description |
---|---|---|
System.Single | value | The value to round. |
Returns
Type | Description |
---|---|
System.Single |
|
Round(Single, Single)
Rounds the current value to the nearest multiple of a specified number.
Declaration
public static float Round(this float value, float nearest)
Parameters
Type | Name | Description |
---|---|---|
System.Single | value | The value to round. |
System.Single | nearest | The nearest multiple to which |
Returns
Type | Description |
---|---|
System.Single |
|
Saturate(Single)
Saturates this single-precision floating-point number.
Declaration
public static float Saturate(this float value)
Parameters
Type | Name | Description |
---|---|---|
System.Single | value | The value to saturate. |
Returns
Type | Description |
---|---|
System.Single | The saturated value. |
Remarks
This method clamps value
between 0 and 1.
Sign(Single)
Returns an integer that indicates the sign of this single-precision floating-point number.
Declaration
public static int Sign(this float value)
Parameters
Type | Name | Description |
---|---|---|
System.Single | value | A signed number. |
Returns
Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
System.Int32 | A number that indicates the sign of
|
Sin(Single)
Returns the sine of the specified angle.
Declaration
public static float Sin(this float value)
Parameters
Type | Name | Description |
---|---|---|
System.Single | value | The angle, measured in radians. |
Returns
Type | Description |
---|---|
System.Single | The sine of |
Sinh(Single)
Returns the hyperbolic sine of the specified angle.
Declaration
public static float Sinh(this float value)
Parameters
Type | Name | Description |
---|---|---|
System.Single | value | The angle, measured in radians. |
Returns
Type | Description |
---|---|
System.Single | The hyperbolic sine of |
Sqrt(Single)
Returns the square root of this single-precision floating-point number.
Declaration
public static float Sqrt(this float value)
Parameters
Type | Name | Description |
---|---|---|
System.Single | value | The number whose square root is to be found. |
Returns
Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
System.Single | One of the values in the following table.
|
Tan(Single)
Returns the tangent of the specified angle.
Declaration
public static float Tan(this float value)
Parameters
Type | Name | Description |
---|---|---|
System.Single | value | The angle, measured in radians. |
Returns
Type | Description |
---|---|
System.Single | The tangent of |
Tanh(Single)
Returns the hyperbolic tangent of the specified angle.
Declaration
public static float Tanh(this float value)
Parameters
Type | Name | Description |
---|---|---|
System.Single | value | The angle, measured in radians. |
Returns
Type | Description |
---|---|
System.Single | The hyperbolic tangent of |
Wrap(Single, Single)
Wraps the current single-precision floating-point number between 0 and a high value.
Declaration
public static float Wrap(this float value, float length)
Parameters
Type | Name | Description |
---|---|---|
System.Single | value | The value to wrap. |
System.Single | length | The exclusive upper bound. |
Returns
Type | Description |
---|---|
System.Single | The wrapped value. |
Wrap(Single, Single, Single)
Wraps the current single-precision floating-point number between a low and a high value.
Declaration
public static float Wrap(this float value, float low, float high)
Parameters
Type | Name | Description |
---|---|---|
System.Single | value | The value to wrap. |
System.Single | low | The inclusive lower bound. |
System.Single | high | The exclusive upper bound. |
Returns
Type | Description |
---|---|
System.Single | The wrapped value. |