docs.unity.cn
    Show / Hide Table of Contents

    Struct Math.FloatRange

    Range of possible values for some constrained parameter.

    Namespace: Unity.Physics
    Syntax
    public struct FloatRange : IEquatable<Math.FloatRange>

    Constructors

    FloatRange(Single, Single)

    Declaration
    public FloatRange(float min, float max)
    Parameters
    Type Name Description
    Single min
    Single max

    Fields

    Max

    Declaration
    public float Max
    Field Value
    Type Description
    Single

    Min

    Declaration
    public float Min
    Field Value
    Type Description
    Single

    Properties

    Mid

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

    Methods

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj
    Returns
    Type Description
    Boolean

    Equals(Math.FloatRange)

    Declaration
    public bool Equals(Math.FloatRange other)
    Parameters
    Type Name Description
    Math.FloatRange other
    Returns
    Type Description
    Boolean

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32

    Sorted()

    Returns a sorted copy of this instance.

    Declaration
    public Math.FloatRange Sorted()
    Returns
    Type Description
    Math.FloatRange

    A copy of this instance, where Min is the lesser of Min and Max, and Max is the greater of the two.

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    Operators

    Implicit(float2 to Math.FloatRange)

    Declaration
    public static implicit operator Math.FloatRange(float2 f)
    Parameters
    Type Name Description
    float2 f
    Returns
    Type Description
    Math.FloatRange

    Implicit(Math.FloatRange to float2)

    Declaration
    public static implicit operator float2(Math.FloatRange range)
    Parameters
    Type Name Description
    Math.FloatRange range
    Returns
    Type Description
    float2
    Back to top Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Tuesday, April 26, 2022
    Terms of use