Calculate vec2 absolute value.
Target vector.
Error - When a computed component is NaN or non-finite.
abs({ x: -1, y: -2 }); // -> { x: 1, y: 2 } Copy
abs({ x: -1, y: -2 }); // -> { x: 1, y: 2 }
Optional
Destination object to store the result.
const result = { x: 0, y: 0 };abs({ x: -1, y: -2 }, result); // result -> { x: 1, y: 2 } Copy
const result = { x: 0, y: 0 };abs({ x: -1, y: -2 }, result); // result -> { x: 1, y: 2 }
Calculate vec2 absolute value.