16 lines
298 B
JavaScript
16 lines
298 B
JavaScript
module.exports = round
|
|
|
|
/**
|
|
* Math.round the components of a vec3
|
|
*
|
|
* @param {vec3} out the receiving vector
|
|
* @param {vec3} a vector to round
|
|
* @returns {vec3} out
|
|
*/
|
|
function round(out, a) {
|
|
out[0] = Math.round(a[0])
|
|
out[1] = Math.round(a[1])
|
|
out[2] = Math.round(a[2])
|
|
return out
|
|
}
|