src/interpretors.js
/**
 * Translate RIX-score to description
 * @param {number} x RIX-score
 * @returns {number} Years of education needed to understand text
 */
Translate RIX-score to description
@param {number} x RIX-score
@returns {number} Years of education needed to understand text
Translate RIX - score to description @param { number } x RIX - score @returns { number } Years of education needed to understand text
function RIX(x) {
  if (typeof x != "number" || x < 1) {
    throw new TypeError("Parameter 'x' must be a number >= 1");
  }
  if (x == Infinity) {
    return NaN;
  } else if (x < 0.2) {
    return 1;
  } else if (x >= 0.2 && x < 0.5) {
    return 2;
  } else if (x >= 0.5 && x < 0.8) {
    return 3;
  } else if (x >= 0.8 && x < 1.3) {
    return 4;
  } else if (x >= 1.3 && x < 1.8) {
    return 5;
  } else if (x >= 1.8 && x < 2.4) {
    return 6;
  } else if (x >= 2.4 && x < 3.0) {
    return 7;
  } else if (x >= 3.0 && x < 3.7) {
    return 8;
  } else if (x >= 3.7 && x < 4.5) {
    return 9;
  } else if (x >= 4.5 && x < 5.3) {
    return 10;
  } else if (x >= 5.3 && x < 6.2) {
    return 11;
  } else if (x >= 6.2 && x < 7.2) {
    return 12;
  } else if (x >= 7.2) {
    return 13;
  }
}
function RIX ( x ) { if ( typeof x != "number" || x < 1 ) { throw new TypeError ( "Parameter 'x' must be a number >= 1" ) ; } if ( x == Infinity ) { return NaN ; } else if ( x < 0.2 ) { return 1 ; } else if ( x >= 0.2 && x < 0.5 ) { return 2 ; } else if ( x >= 0.5 && x < 0.8 ) { return 3 ; } else if ( x >= 0.8 && x < 1.3 ) { return 4 ; } else if ( x >= 1.3 && x < 1.8 ) { return 5 ; } else if ( x >= 1.8 && x < 2.4 ) { return 6 ; } else if ( x >= 2.4 && x < 3.0 ) { return 7 ; } else if ( x >= 3.0 && x < 3.7 ) { return 8 ; } else if ( x >= 3.7 && x < 4.5 ) { return 9 ; } else if ( x >= 4.5 && x < 5.3 ) { return 10 ; } else if ( x >= 5.3 && x < 6.2 ) { return 11 ; } else if ( x >= 6.2 && x < 7.2 ) { return 12 ; } else if ( x >= 7.2 ) { return 13 ; } }
Translate RIX-score to description
 @param {number} x RIX-score
 @returns {number} Years of education needed to understand text
Translate RIX - score to description @param { number } x RIX - score @returns { number } Years of education needed to understand text