Class Vector2Extensions
Numeric-extensions for
Inheritance
Namespace: X10D.Numerics
Assembly: X10D.dll
Syntax
public static class Vector2Extensions : object
Methods
| Improve this Doc View SourceDeconstruct(Vector2, out Single, out Single)
Deconstructs the current
Declaration
public static void Deconstruct(this Vector2 vector, out float x, out float y)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | vector | The vector to deconstruct. |
System.Single | x | The X component value. |
System.Single | y | The Y component value. |
IsOnLine(Vector2, PointF, PointF)
Determines if the current
Declaration
public static bool IsOnLine(this Vector2 point, PointF start, PointF end)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | point | The point to check. |
PointF | start | The starting point of the line. |
PointF | end | The ending point of the line. |
Returns
Type | Description |
---|---|
System.Boolean | true if |
IsOnLine(Vector2, Vector2, Vector2)
Determines if the current
Declaration
public static bool IsOnLine(this Vector2 point, Vector2 start, Vector2 end)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | point | The point to check. |
Vector2 | start | The starting point of the line. |
Vector2 | end | The ending point of the line. |
Returns
Type | Description |
---|---|
System.Boolean | true if |
IsOnLine(Vector2, LineF)
Determines if the current
Declaration
public static bool IsOnLine(this Vector2 point, LineF line)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | point | The point to check. |
LineF | line | The line on which the point may lie. |
Returns
Type | Description |
---|---|
System.Boolean | true if |
Round(Vector2)
Rounds the components in the current
Declaration
public static Vector2 Round(this Vector2 vector)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | vector | The vector whose components to round. |
Returns
Type | Description |
---|---|
Vector2 | The rounded vector. |
Round(Vector2, Single)
Rounds the components in the current
Declaration
public static Vector2 Round(this Vector2 vector, float nearest)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | vector | The vector whose components to round. |
System.Single | nearest | The nearest multiple to which the components should be rounded. |
Returns
Type | Description |
---|---|
Vector2 | The rounded vector. |
ToPointF(Vector2)
Converts the current
Declaration
public static PointF ToPointF(this Vector2 vector)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | vector | The vector to convert. |
Returns
Type | Description |
---|---|
PointF | The resulting |
ToSizeF(Vector2)
Converts the current
Declaration
public static SizeF ToSizeF(this Vector2 vector)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | vector | The vector to convert. |
Returns
Type | Description |
---|---|
SizeF | The resulting |
WithX(Vector2, Single)
Returns a vector whose Y component is the same as the specified vector, and whose X component is a new value.
Declaration
public static Vector2 WithX(this Vector2 vector, float x)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | vector | The vector to copy. |
System.Single | x | The new X component value. |
Returns
Type | Description |
---|---|
Vector2 | A new instance of |
WithY(Vector2, Single)
Returns a vector whose X component is the same as the specified vector, and whose Y component is a new value.
Declaration
public static Vector2 WithY(this Vector2 vector, float y)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | vector | The vector to copy. |
System.Single | y | The new Y component value. |
Returns
Type | Description |
---|---|
Vector2 | A new instance of |