point2ToNdc
point2ToNdc(
p,viewport):Vec2
Defined in: coordinate-spaces.ts:14
Converts a point in pixel coordinates to normalized device coordinates (NDC).
Parameters
Section titled “Parameters”The point in pixel coordinates.
viewport
Section titled “viewport”The size of the viewport in pixels.
Returns
Section titled “Returns”Vec2
The point in NDC, where x and y are in the range [-1, 1].