Class Velocity | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class Velocity

    Inheritance
    System.Object
    Velocity
    Namespace: Unity.UIWidgets.gestures
    Syntax
    public class Velocity : IEquatable<Velocity>

    Constructors

    Velocity(Offset)

    Declaration
    public Velocity(Offset pixelsPerSecond = null)
    Parameters
    Type Name Description
    Offset pixelsPerSecond

    Fields

    pixelsPerSecond

    Declaration
    public readonly Offset pixelsPerSecond
    Field Value
    Type Description
    Offset

    zero

    Declaration
    public static readonly Velocity zero
    Field Value
    Type Description
    Velocity

    Methods

    clampMagnitude(Single, Single)

    Declaration
    public Velocity clampMagnitude(float minValue, float maxValue)
    Parameters
    Type Name Description
    System.Single minValue
    System.Single maxValue
    Returns
    Type Description
    Velocity

    Equals(Object)

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

    Equals(Velocity)

    Declaration
    public bool Equals(Velocity other)
    Parameters
    Type Name Description
    Velocity other
    Returns
    Type Description
    System.Boolean

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    Overrides
    System.Object.GetHashCode()

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String
    Overrides
    System.Object.ToString()

    Operators

    Addition(Velocity, Velocity)

    Declaration
    public static Velocity operator +(Velocity a, Velocity b)
    Parameters
    Type Name Description
    Velocity a
    Velocity b
    Returns
    Type Description
    Velocity

    Equality(Velocity, Velocity)

    Declaration
    public static bool operator ==(Velocity left, Velocity right)
    Parameters
    Type Name Description
    Velocity left
    Velocity right
    Returns
    Type Description
    System.Boolean

    Inequality(Velocity, Velocity)

    Declaration
    public static bool operator !=(Velocity left, Velocity right)
    Parameters
    Type Name Description
    Velocity left
    Velocity right
    Returns
    Type Description
    System.Boolean

    Subtraction(Velocity, Velocity)

    Declaration
    public static Velocity operator -(Velocity a, Velocity b)
    Parameters
    Type Name Description
    Velocity a
    Velocity b
    Returns
    Type Description
    Velocity

    UnaryNegation(Velocity)

    Declaration
    public static Velocity operator -(Velocity a)
    Parameters
    Type Name Description
    Velocity a
    Returns
    Type Description
    Velocity
    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