mwg API
    Preparing search index...

    Function sliderValueAt

    • The value at a 0-to-1 position on the track, snapped to step and clamped to [min, max]. The snap is rounded to the step's own number of decimals, so a 0.1 step reads 0.3 rather than 0.30000000000000004.

      Parameters

      • fraction: number
      • min: number = 0
      • max: number = 1
      • step: number = 0

      Returns number

      import { sliderValueAt } from '@datamoc/mw_games/two-d/ui';

      console.log(sliderValueAt(0.5, 0, 10, 1)); // 5