Taos API Reference
    Preparing search index...

    Class Vec2

    2D vector with mutable x/y components and immutable arithmetic methods.

    Index

    Constructors

    Properties

    x: number
    y: number
    ZERO: Vec2 = ...
    ONE: Vec2 = ...

    Methods

    • Sets x and y in place and returns this.

      Parameters

      • x: number
      • y: number

      Returns this

    • Returns [x, y].

      Returns [number, number]