Struct Math.FloatRange | Unity Physics | 0.5.1-preview.2
docs.unity3d.com
    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 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
    Overrides
    ValueType.Equals(Object)

    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
    Overrides
    ValueType.GetHashCode()

    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
    Overrides
    ValueType.ToString()

    Operators

    Implicit(float2 to Math.FloatRange)

    Declaration
    public static implicit operator Math.FloatRange(float2 f)
    Parameters
    Type Name Description
    Unity.Mathematics.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
    Unity.Mathematics.float2
    In This Article
    • Constructors
      • FloatRange(Single, Single)
    • Fields
      • Max
      • Min
    • Properties
      • Mid
    • Methods
      • Equals(Object)
      • Equals(Math.FloatRange)
      • GetHashCode()
      • Sorted()
      • ToString()
    • Operators
      • Implicit(float2 to Math.FloatRange)
      • Implicit(Math.FloatRange to float2)
    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