@minecraft
    正在准备搜索索引...

    类 Vector2Builder

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

    用于 @minecraft/server 中需要用到 Vector2 的 API 的 Vector2 包装类。

    实现

    索引

    构造函数

    属性

    x: number

    X component of the two-dimensional vector.

    y: number

    Y component of the two-dimensional vector.

    方法

    • floor

      Floor the components of a vector to produce a new vector

      返回 this

    • lerp

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

      参数

      返回 this

    • scale

      Scales this by the passed in value, returning itself.

      参数

      • val: number

      返回 this

    • slerp

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

      参数

      返回 this

    • Returns a string representation of an object.

      参数

      • 可选options: { decimals?: number; delimiter?: string }

      返回 string