Search Results for

    Show / Hide Table of Contents

    Class VectorUtilities

    Extensions and utilities for vectors

    Inheritance
    Object
    VectorUtilities
    Namespace: i5.Toolkit.Core.Utilities
    Assembly: cs.temp.dll.dll
    Syntax
    public static class VectorUtilities

    Methods

    ToArray(Vector2)

    Converts the given vector to a float array

    Declaration
    public static float[] ToArray(this Vector2 vector)
    Parameters
    Type Name Description
    Vector2 vector

    The vector to convert

    Returns
    Type Description
    Single[]

    Returns a float array with the vector's components

    ToArray(Vector3)

    Converts the given vector to a float array

    Declaration
    public static float[] ToArray(this Vector3 vector)
    Parameters
    Type Name Description
    Vector3 vector

    The vector to convert

    Returns
    Type Description
    Single[]

    Returns a float array with the vector's components

    ToArray(Vector4)

    Converts the given vector to a float array

    Declaration
    public static float[] ToArray(this Vector4 vector)
    Parameters
    Type Name Description
    Vector4 vector

    The vector to convert

    Returns
    Type Description
    Single[]

    Returns a float array with the vector's components

    Vector2FromArray(Single[])

    Converts a float array to a Vector2

    Declaration
    public static Vector2 Vector2FromArray(float[] array)
    Parameters
    Type Name Description
    Single[] array

    The array to convert

    Returns
    Type Description
    Vector2

    Returns a Vector2 where the components are the first three entries of the array

    Vector3FromArray(Single[])

    Converts a float array to a Vector3

    Declaration
    public static Vector3 Vector3FromArray(float[] array)
    Parameters
    Type Name Description
    Single[] array

    The array to convert

    Returns
    Type Description
    Vector3

    Returns a Vector3 where the components are the first three entries of the array

    Vector4FromArray(Single[])

    Converts a float array to a Vector4

    Declaration
    public static Vector4 Vector4FromArray(float[] array)
    Parameters
    Type Name Description
    Single[] array

    The array to convert

    Returns
    Type Description
    Vector4

    Returns a Vector4 where the components are the first four entries of the array

    In This Article
    Back to top i5 Toolkit Documentation