Struct BoundedValue | AI Planner | 0.2.4-preview.3
docs.unity3d.com
    Show / Hide Table of Contents

    Struct BoundedValue

    A bounded estimate of a value, given by an average as well as an upper and lower bound.

    Namespace: Unity.AI.Planner
    Syntax
    public struct BoundedValue

    Constructors

    BoundedValue(Single, Single, Single)

    Constructs a bounded value.

    Declaration
    public BoundedValue(float lb, float avg, float ub)
    Parameters
    Type Name Description
    Single lb

    The value of the lower bound.

    Single avg

    The value of the average.

    Single ub

    The value of the upper bound.

    BoundedValue(float3)

    Constructs a bounded value from a float3 vector (x = lower bound, y = average, z = upper bound).

    Declaration
    public BoundedValue(float3 vector)
    Parameters
    Type Name Description
    float3 vector

    The vector to be used to set the bounds and average.

    Properties

    Average

    The average estimate of the value.

    Declaration
    public float Average { get; }
    Property Value
    Type Description
    Single

    LowerBound

    The lower bound of the estimated value.

    Declaration
    public float LowerBound { get; }
    Property Value
    Type Description
    Single

    Range

    The range of the estimated value (range = upper bound - lower bound).

    Declaration
    public float Range { get; }
    Property Value
    Type Description
    Single

    UpperBound

    The upper bound of the estimated value.

    Declaration
    public float UpperBound { get; }
    Property Value
    Type Description
    Single

    Methods

    Approximately(BoundedValue)

    Determines if two bounded values are approximately equal.

    Declaration
    public bool Approximately(BoundedValue other)
    Parameters
    Type Name Description
    BoundedValue other

    The BoundedValue instance to compare.

    Returns
    Type Description
    Boolean

    Returns true if two bounded values are approximately equal.

    ToString()

    Returns a string that represents the bounds

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    A string that represents the bounds

    Overrides
    ValueType.ToString()

    Operators

    Addition(Single, BoundedValue)

    Returns the sum of a bounded value and a scalar value.

    Declaration
    public static BoundedValue operator +(float scalar, BoundedValue boundedValue)
    Parameters
    Type Name Description
    Single scalar

    The scalar to be added.

    BoundedValue boundedValue

    The bounded value to be added.

    Returns
    Type Description
    BoundedValue

    Returns the sum of a bounded value and a scalar value.

    Addition(BoundedValue, Single)

    Returns the sum of a bounded value and a scalar value.

    Declaration
    public static BoundedValue operator +(BoundedValue boundedValue, float scalar)
    Parameters
    Type Name Description
    BoundedValue boundedValue

    The bounded value to be added.

    Single scalar

    The scalar to be added.

    Returns
    Type Description
    BoundedValue

    Returns the sum of a bounded value and a scalar value.

    Addition(BoundedValue, BoundedValue)

    Returns the sum of two bounded values.

    Declaration
    public static BoundedValue operator +(BoundedValue boundedValue1, BoundedValue boundedValue2)
    Parameters
    Type Name Description
    BoundedValue boundedValue1

    The first bounded value to be added.

    BoundedValue boundedValue2

    The second bounded value to be added.

    Returns
    Type Description
    BoundedValue

    Returns the sum of two bounded values.

    Implicit(BoundedValue to float3)

    Converts a BoundedValue to a float3.

    Declaration
    public static implicit operator float3(BoundedValue value)
    Parameters
    Type Name Description
    BoundedValue value

    The BoundedValue instance to convert.

    Returns
    Type Description
    float3

    A float3 representation of the bounded value.

    Implicit(float3 to BoundedValue)

    Converts a float3 to a BoundedValue.

    Declaration
    public static implicit operator BoundedValue(float3 vector)
    Parameters
    Type Name Description
    float3 vector

    The vector to convert to a bounded value.

    Returns
    Type Description
    BoundedValue

    A BoundedValue representation of the vector.

    Multiply(Single, BoundedValue)

    Returns the product of a bounded value and a scalar value.

    Declaration
    public static BoundedValue operator *(float scalar, BoundedValue boundedValue)
    Parameters
    Type Name Description
    Single scalar

    The scalar to be multiplied.

    BoundedValue boundedValue

    The bounded value to be multiplied.

    Returns
    Type Description
    BoundedValue

    Returns the product of a bounded value and a scalar value.

    Multiply(BoundedValue, Single)

    Returns the product of a bounded value and a scalar value.

    Declaration
    public static BoundedValue operator *(BoundedValue boundedValue, float scalar)
    Parameters
    Type Name Description
    BoundedValue boundedValue

    The bounded value to be multiplied.

    Single scalar

    The scalar to be multiplied.

    Returns
    Type Description
    BoundedValue

    Returns the product of a bounded value and a scalar value.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023