docs: static int round(double d) {
          // NOTE: This code seems to be faster than Math.round(double)...
          // Version that uses no function calls at all.
          int n = (int) d;
          double diff = d - (double) n;
          if (diff < 0) {
              diff = -diff;
          }
          if (diff >= 0.5) {
              if (d < 0) {
                  n--;
              }
              else {
                  n++;
              }
          }
          return n;
      }