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