function round(data) {
  for (let i = data.length; i-- > 0; ) {
    data[i] = Math.round(data[i]);
  }
  return data;
}
Simple rounding function if precision is 0.

@param {number[]} data
@returns {number[]}