code: func round(d, r int64) int64 {
  	neg := d < 0
  	if neg {
  		d = -d
  	}
  	if m := d % r; m+m < r {
  		d = d - m
  	} else {
  		d = d + r - m
  	}
  	if neg {
  		return -d
  	}
  	return d
  }
docs: // round rounds number d to the nearest r-boundary