# Scale inverse to slider position

**URL:** <https://forum.kirupa.com/t/scale-inverse-to-slider-position/325987>\
**Category:** Uncategorized\
**Created:** [November 15, 2011, 4:39pm UTC](https://forum.kirupa.com/t/scale-inverse-to-slider-position/325987 "2011-11-15T16:39:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bonassus](https://avatars.discourse-cdn.com/v4/letter/b/ea5d25/32.png) [@bonassus](https://forum.kirupa.com/u/bonassus)\
**Post date:** [November 15, 2011, 4:39pm UTC](https://forum.kirupa.com/t/scale-inverse-to-slider-position/325987/1 "2011-11-15T16:39:44Z")

</div>

I have a var that captures a slider position like this:

```auto
var sliderPosition = Math.round((thumb.y-bounds.top)/(bounds.right-bounds.top)*100);

```

which outputs a number between 0 and 100 starting on 0. I need to scale an mc from 1 at sliderPosition =0 to .42 at sliderPosition = 100.

Is there a math function that will help me do this?

sorry for the vague explanation. help will be appreciated.

Thanks!
