dino-ge
    Preparing search index...

    Class default

    Class representing a 2D vector or point. Implements a fluent, mutating API to reduce object allocations.

    Index

    Constructors

    Properties

    onChange?: () => void

    Optional callback fired when x or y is modified.

    Accessors

    Methods

    • Multiplies this vector by a scalar (mutates).

      Parameters

      • scalar: number

        The value to multiply by.

      Returns this

      This vector for chaining.

    • Sets the components of this vector.

      Parameters

      • x: number

        New x coordinate.

      • y: number

        New y coordinate.

      Returns this

      This vector for chaining.