nl_tokens: / * Maps a value between [ minRange -- maxRange ] into [ 0 -- n ] . The target range will be an integer number .
pl_tokens: function ( val , n ) { var $this = this ; var rangeMin = $this . data ( 'range_min' ) ; var rangeMax = $this . data ( 'range_max' ) ; if ( val <= rangeMin ) { return 0 ; } if ( val >= rangeMax ) { return n ; } return Math . <mask> ( ( n * val - n * rangeMin ) / ( rangeMax - rangeMin ) ) ; }