@minecraft
    Preparing search index...

    Class Vector2Builder

    Vector2 wrapper class which can be used as a Vector2 for APIs on @minecraft/server which require a Vector2.

    Implements

    Index

    Constructors

    Properties

    x: number

    X component of the two-dimensional vector.

    y: number

    Y component of the two-dimensional vector.

    Methods

    • clamp

      Clamps the components of a vector to limits to produce a new vector

      Parameters

      Returns this

    • floor

      Floor the components of a vector to produce a new vector

      Returns this

    • lerp

      Constructs a new vector using linear interpolation on each component from two vectors.

      Parameters

      Returns this

    • scale

      Scales this by the passed in value, returning itself.

      Parameters

      • val: number

      Returns this

    • slerp

      Constructs a new vector using spherical linear interpolation on each component from two vectors.

      Parameters

      Returns this

    • Returns a string representation of an object.

      Parameters

      • Optionaloptions: { decimals?: number; delimiter?: string }

      Returns string