static mod (x, m) {
    m = m < 0 ? -m : m
    let r = x % m
    return (r < 0 ? r + m : r)
  }
/**
   * Custom modulo function always returning positive values.
   * @see http://stackoverflow.com/questions/1082917
   * @param {number} x
   * @param {number} m
   * @return {number}
   */
Custom modulo function always returning positive values.
Custom modulo function always returning positive values .
static mod (x, m) {
    m = m < 0 ? -m : m
    let r = x % m
    return (r < 0 ? r + m : r)
  }
static mod ( x , m ) { m = m < 0 ? - m : m let r = x % m return ( r < 0 ? r + m : r ) }
Custom modulo function always returning positive values.
Custom modulo function always returning positive values .