Search Results for

    Show / Hide Table of Contents

    Class KaijuAgentsNormalization

    Helper normalization methods.

    Inheritance
    System.Object
    KaijuAgentsNormalization
    Namespace: KaijuSolutions.Agents.Extensions
    Syntax
    public static class KaijuAgentsNormalization

    Methods

    Normalize(Single, Single, Single, Single)

    Normalize a float.

    Declaration
    public static float Normalize(this float value, float original, float min = -1F, float max = 1F)
    Parameters
    Type Name Description
    System.Single value

    The value.

    System.Single original

    The original max value possible.

    System.Single min

    The new normalized minimum.

    System.Single max

    The new normalized maximum.

    Returns
    Type Description
    System.Single

    The normalized float.

    Normalize(Vector2, Component, Single)

    Normalize a vector between [-1, 1] relative to a position and its forward.

    Declaration
    public static Vector2 Normalize(this Vector2 value, Component position, float original)
    Parameters
    Type Name Description
    Vector2 value

    The vector.

    Component position

    The position and forward to get the vector relative to.

    System.Single original

    The original max value possible, such as a detection distance.

    Returns
    Type Description
    Vector2

    The normalized vector.

    Normalize(Vector2, GameObject, Single)

    Normalize a vector between [-1, 1] relative to a position and its forward.

    Declaration
    public static Vector2 Normalize(this Vector2 value, GameObject position, float original)
    Parameters
    Type Name Description
    Vector2 value

    The vector.

    GameObject position

    The position and forward to get the vector relative to.

    System.Single original

    The original max value possible, such as a detection distance.

    Returns
    Type Description
    Vector2

    The normalized vector.

    Normalize(Vector2, Single, Single, Single)

    Normalize a vector.

    Declaration
    public static Vector2 Normalize(this Vector2 value, float original, float min = -1F, float max = 1F)
    Parameters
    Type Name Description
    Vector2 value

    The vector.

    System.Single original

    The original max value possible.

    System.Single min

    The new normalized minimum.

    System.Single max

    The new normalized maximum.

    Returns
    Type Description
    Vector2

    The normalized vector.

    Normalize(Vector2, Transform, Single)

    Normalize a vector between [-1, 1] relative to a position and its forward.

    Declaration
    public static Vector2 Normalize(this Vector2 value, Transform position, float original)
    Parameters
    Type Name Description
    Vector2 value

    The vector.

    Transform position

    The position and forward to get the vector relative to.

    System.Single original

    The original max value possible, such as a detection distance.

    Returns
    Type Description
    Vector2

    The normalized vector.

    Normalize(Vector2, Vector2, Vector2, Single)

    Normalize a vector between [-1, 1] relative to a position and forward.

    Declaration
    public static Vector2 Normalize(this Vector2 value, Vector2 position, Vector2 forward, float original)
    Parameters
    Type Name Description
    Vector2 value

    The vector.

    Vector2 position

    The position to get the vector relative to.

    Vector2 forward

    The forward to get the vector relative to.

    System.Single original

    The original max value possible, such as a detection distance.

    Returns
    Type Description
    Vector2

    The normalized vector.

    Normalize(Vector2, Vector2, Vector3, Single)

    Normalize a vector between [-1, 1] relative to a position and forward.

    Declaration
    public static Vector2 Normalize(this Vector2 value, Vector2 position, Vector3 forward, float original)
    Parameters
    Type Name Description
    Vector2 value

    The vector.

    Vector2 position

    The position to get the vector relative to.

    Vector3 forward

    The forward to get the vector relative to.

    System.Single original

    The original max value possible, such as a detection distance.

    Returns
    Type Description
    Vector2

    The normalized vector.

    Normalize(Vector2, Vector3, Vector2, Single)

    Normalize a vector between [-1, 1] relative to a position and forward.

    Declaration
    public static Vector2 Normalize(this Vector2 value, Vector3 position, Vector2 forward, float original)
    Parameters
    Type Name Description
    Vector2 value

    The vector.

    Vector3 position

    The position to get the vector relative to.

    Vector2 forward

    The forward to get the vector relative to.

    System.Single original

    The original max value possible, such as a detection distance.

    Returns
    Type Description
    Vector2

    The normalized vector.

    Normalize(Vector2, Vector3, Vector3, Single)

    Normalize a vector between [-1, 1] relative to a position and forward.

    Declaration
    public static Vector2 Normalize(this Vector2 value, Vector3 position, Vector3 forward, float original)
    Parameters
    Type Name Description
    Vector2 value

    The vector.

    Vector3 position

    The position to get the vector relative to.

    Vector3 forward

    The forward to get the vector relative to.

    System.Single original

    The original max value possible, such as a detection distance.

    Returns
    Type Description
    Vector2

    The normalized vector.

    Normalize(Vector3, Component, Single)

    Normalize a vector between [-1, 1] relative to a position and its forward.

    Declaration
    public static Vector3 Normalize(this Vector3 value, Component position, float original)
    Parameters
    Type Name Description
    Vector3 value

    The vector.

    Component position

    The position and forward to get the vector relative to.

    System.Single original

    The original max value possible, such as a detection distance.

    Returns
    Type Description
    Vector3

    The normalized vector.

    Normalize(Vector3, GameObject, Single)

    Normalize a vector between [-1, 1] relative to a position and its forward.

    Declaration
    public static Vector3 Normalize(this Vector3 value, GameObject position, float original)
    Parameters
    Type Name Description
    Vector3 value

    The vector.

    GameObject position

    The position and forward to get the vector relative to.

    System.Single original

    The original max value possible, such as a detection distance.

    Returns
    Type Description
    Vector3

    The normalized vector.

    Normalize(Vector3, Single, Single, Single)

    Normalize a vector.

    Declaration
    public static Vector3 Normalize(this Vector3 value, float original, float min = -1F, float max = 1F)
    Parameters
    Type Name Description
    Vector3 value

    The vector.

    System.Single original

    The original max value possible.

    System.Single min

    The new normalized minimum.

    System.Single max

    The new normalized maximum.

    Returns
    Type Description
    Vector3

    The normalized vector.

    Normalize(Vector3, Transform, Single)

    Normalize a vector between [-1, 1] relative to a position and its forward.

    Declaration
    public static Vector3 Normalize(this Vector3 value, Transform position, float original)
    Parameters
    Type Name Description
    Vector3 value

    The vector.

    Transform position

    The position and forward to get the vector relative to.

    System.Single original

    The original max value possible, such as a detection distance.

    Returns
    Type Description
    Vector3

    The normalized vector.

    Normalize(Vector3, Vector2, Vector2, Single)

    Normalize a vector between [-1, 1] relative to a position and forward.

    Declaration
    public static Vector3 Normalize(this Vector3 value, Vector2 position, Vector2 forward, float original)
    Parameters
    Type Name Description
    Vector3 value

    The vector.

    Vector2 position

    The position to get the vector relative to.

    Vector2 forward

    The forward to get the vector relative to.

    System.Single original

    The original max value possible, such as a detection distance.

    Returns
    Type Description
    Vector3

    The normalized vector.

    Normalize(Vector3, Vector2, Vector3, Single)

    Normalize a vector between [-1, 1] relative to a position and forward.

    Declaration
    public static Vector3 Normalize(this Vector3 value, Vector2 position, Vector3 forward, float original)
    Parameters
    Type Name Description
    Vector3 value

    The vector.

    Vector2 position

    The position to get the vector relative to.

    Vector3 forward

    The forward to get the vector relative to.

    System.Single original

    The original max value possible, such as a detection distance.

    Returns
    Type Description
    Vector3

    The normalized vector.

    Normalize(Vector3, Vector3, Vector2, Single)

    Normalize a vector between [-1, 1] relative to a position and forward.

    Declaration
    public static Vector3 Normalize(this Vector3 value, Vector3 position, Vector2 forward, float original)
    Parameters
    Type Name Description
    Vector3 value

    The vector.

    Vector3 position

    The position to get the vector relative to.

    Vector2 forward

    The forward to get the vector relative to.

    System.Single original

    The original max value possible, such as a detection distance.

    Returns
    Type Description
    Vector3

    The normalized vector.

    Normalize(Vector3, Vector3, Vector3, Single)

    Normalize a vector between [-1, 1] relative to a position and forward.

    Declaration
    public static Vector3 Normalize(this Vector3 value, Vector3 position, Vector3 forward, float original)
    Parameters
    Type Name Description
    Vector3 value

    The vector.

    Vector3 position

    The position to get the vector relative to.

    Vector3 forward

    The forward to get the vector relative to.

    System.Single original

    The original max value possible, such as a detection distance.

    Returns
    Type Description
    Vector3

    The normalized vector.

    In This Article
    Back to top MIT License © 2026 Kaiju Solutions Inc.