Class Vector4Extensions
Numeric-extensions for
Inheritance
Namespace: X10D.Numerics
Assembly: X10D.dll
Syntax
public static class Vector4Extensions : object
Methods
| Improve this Doc View SourceDeconstruct(Vector4, out Single, out Single, out Single, out Single)
Deconstructs the current
Declaration
public static void Deconstruct(this Vector4 vector, out float x, out float y, out float z, out float w)
Parameters
Type | Name | Description |
---|---|---|
Vector4 | vector | The vector to deconstruct. |
System.Single | x | The X component value. |
System.Single | y | The Y component value. |
System.Single | z | The Z component value. |
System.Single | w | The W component value. |
Round(Vector4)
Rounds the components in the current
Declaration
public static Vector4 Round(this Vector4 vector)
Parameters
Type | Name | Description |
---|---|---|
Vector4 | vector | The vector whose components to round. |
Returns
Type | Description |
---|---|
Vector4 | The rounded vector. |
Round(Vector4, Single)
Rounds the components in the current
Declaration
public static Vector4 Round(this Vector4 vector, float nearest)
Parameters
Type | Name | Description |
---|---|---|
Vector4 | vector | The vector whose components to round. |
System.Single | nearest | The nearest multiple to which the components should be rounded. |
Returns
Type | Description |
---|---|
Vector4 | The rounded vector. |
WithW(Vector4, Single)
Returns a vector whose X, Y, and Z components are the same as the specified vector, and whose W component is a new value.
Declaration
public static Vector4 WithW(this Vector4 vector, float w)
Parameters
Type | Name | Description |
---|---|---|
Vector4 | vector | The vector to copy. |
System.Single | w | The new W component value. |
Returns
Type | Description |
---|---|
Vector4 | A new instance of |
WithX(Vector4, Single)
Returns a vector whose Y, Z, and W components are the same as the specified vector, and whose X component is a new value.
Declaration
public static Vector4 WithX(this Vector4 vector, float x)
Parameters
Type | Name | Description |
---|---|---|
Vector4 | vector | The vector to copy. |
System.Single | x | The new X component value. |
Returns
Type | Description |
---|---|
Vector4 | A new instance of |
WithY(Vector4, Single)
Returns a vector whose X, Z, and W components are the same as the specified vector, and whose Y component is a new value.
Declaration
public static Vector4 WithY(this Vector4 vector, float y)
Parameters
Type | Name | Description |
---|---|---|
Vector4 | vector | The vector to copy. |
System.Single | y | The new Y component value. |
Returns
Type | Description |
---|---|
Vector4 | A new instance of |
WithZ(Vector4, Single)
Returns a vector whose X, Y, and W components are the same as the specified vector, and whose Z component is a new value.
Declaration
public static Vector4 WithZ(this Vector4 vector, float z)
Parameters
Type | Name | Description |
---|---|---|
Vector4 | vector | The vector to copy. |
System.Single | z | The new Z component value. |
Returns
Type | Description |
---|---|
Vector4 | A new instance of |