Element index of this value's first element within its view.
Returns the length of Vec.
The active typed-array memory view.
Gets the value at given index.
Copies a managed array to this. Reads from from ITS OWN view and writes into
this value's view, so the operands may live in different managers / element
types (e.g. copying an f64 source into an f32 destination performs the
numeric conversion). Assumes non-overlapping regions (true for all munum uses).
Frees the backing pointer (no-op if borrowed).
Computes the linear interpolation between this vector and RHS.
Normalizes this vector.
Scales this vector by given factor.
Copies an array to this.
Sets the value at given index.
StaticviewWraps an existing memory region as a borrowed (non-owning) Vec2.
OptionalbyteOffset: numberProtected StaticviewSingle-sourced borrow helper. Wraps existing memory as a NON-owning instance
of the concrete class ctor: its free()/dispose is always a no-op and the
underlying storage is never freed through it. Subclasses expose a thin typed
static view(...) that forwards here.
the concrete subclass constructor (used only for its prototype)
length of the region in elements
a pointer, or a view provider (a MemoryManager, or float64View(array))
OptionalbyteOffset: number
byte offset into the region; defaults to a passed pointer's own offset
A 2D vector.