Quantcast
Channel: Adobe Community : Popular Discussions - JavaScript
Viewing all articles
Browse latest Browse all 12130

Rounding down.

$
0
0

It's a simple formula. (X-10)/2 rounded down to the nearest whole number.

 

This is what I have so far:

 

var a = this.getField("str")

 

event.value = (a.value -10)/2

 

But that just does the math part, and not the rounding down. I know math.floor is used, but not how. Thanks to anyone who can help!


Viewing all articles
Browse latest Browse all 12130

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>