Vector2.fromBuffer constructor

Vector2.fromBuffer(
  1. ByteBuffer buffer,
  2. int offset
)

Constructs Vector2 with a storage that views given buffer starting at offset. offset has to be multiple of Float64List.bytesPerElement.

Implementation

Vector2.fromBuffer(ByteBuffer buffer, int offset)
    : _v2storage = Float64List.view(buffer, offset, 2);