Class Vector2Extensions
Inheritance
object
Vector2Extensions
Namespace: TetraCreations.Core
Assembly: cs.temp.dll.dll
Syntax
public static class Vector2Extensions
Methods
Add(Vector2, float, float)
Increase/Decrease any point in the vector (x, y).
Declaration
public static Vector2 Add(this Vector2 vector, float x = 0, float y = 0)
Parameters
Type |
Name |
Description |
Vector2 |
vector |
|
float |
x |
|
float |
y |
|
Returns
Copy(Vector2)
Create a copy of the Vector2
Declaration
public static Vector2 Copy(this Vector2 vector)
Parameters
Type |
Name |
Description |
Vector2 |
vector |
|
Returns
Log(Vector2)
Show the Vector2 values in the console
Declaration
public static void Log(this Vector2 vector)
Parameters
Type |
Name |
Description |
Vector2 |
vector |
|
SetX(Vector2, float)
Declaration
public static Vector2 SetX(this Vector2 vector, float x)
Parameters
Type |
Name |
Description |
Vector2 |
vector |
|
float |
x |
|
Returns
SetY(Vector2, float)
Declaration
public static Vector2 SetY(this Vector2 vector, float y)
Parameters
Type |
Name |
Description |
Vector2 |
vector |
|
float |
y |
|
Returns
ToString(Vector2)
Converts a Vector2 to a string in X, Y format
Declaration
public static string ToString(this Vector2 vector)
Parameters
Type |
Name |
Description |
Vector2 |
vector |
|
Returns
With(Vector2, float?, float?)
Returns a new Vector2 while changing/keeping any value from the original vector (x, y).
Declaration
public static Vector2 With(this Vector2 vector, float? x = null, float? y = null)
Parameters
Type |
Name |
Description |
Vector2 |
vector |
|
float? |
x |
|
float? |
y |
|
Returns