wgpu-matrix
    Preparing search index...

    Variable rotate

    rotate: <T extends BaseArgType = Float64Array<ArrayBufferLike>>(
        a: BaseArgType,
        b: BaseArgType,
        rad: number,
        dst?: T,
    ) => T

    Type declaration

      • <T extends BaseArgType = Float64Array<ArrayBufferLike>>(
            a: BaseArgType,
            b: BaseArgType,
            rad: number,
            dst?: T,
        ): T
      • Rotate a 2D vector

        Type Parameters

        Parameters

        • a: BaseArgType

          The vec2 point to rotate

        • b: BaseArgType

          The origin of the rotation

        • rad: number

          The angle of rotation in radians

        • Optionaldst: T

        Returns T

        the rotated vector