toFixed = (num, precision) => {
  const pow = 10 ** precision;
  return Math.round(num * pow) / pow;
}
Does the same as {@link Number.toFixed} but without casting
the return value to a string.

@param {number} num
@param {number} precision
@returns {number}