Search Results for

    Show / Hide Table of Contents

    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
    Type Description
    Vector2

    Copy(Vector2)

    Create a copy of the Vector2

    Declaration
    public static Vector2 Copy(this Vector2 vector)
    Parameters
    Type Name Description
    Vector2 vector
    Returns
    Type Description
    Vector2

    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)

    Set the X axis value

    Declaration
    public static Vector2 SetX(this Vector2 vector, float x)
    Parameters
    Type Name Description
    Vector2 vector
    float x
    Returns
    Type Description
    Vector2

    SetY(Vector2, float)

    Set the Y axis value

    Declaration
    public static Vector2 SetY(this Vector2 vector, float y)
    Parameters
    Type Name Description
    Vector2 vector
    float y
    Returns
    Type Description
    Vector2

    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
    Type Description
    string

    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
    Type Description
    Vector2
    In This Article
    Back to top Tetra Creations documentation