Math operator

Topics related to using ToolBook for building web apps.

Math operator

Postby John Robin Dove » Sat Apr 18, 2015 11:05 am

Hi,

I want to round a number to one decimal. How would I do this in the actions editor please? Example I want 205.397301349325 to be reduced to 205.4. Apologies for my ignorance!
John Robin Dove
 
Posts: 486
Joined: Thu Jan 23, 2014 4:35 am

Re: Math operator

Postby Clifton » Sat Apr 18, 2015 12:25 pm

In the actions editor you would write:

round ( val * 10 ) / 10

Just multiply and then divide by the number of decimal places needed.
Clifton
Site Admin
 
Posts: 732
Joined: Tue Jan 14, 2014 1:04 am

Re: Math operator

Postby John Robin Dove » Sun Apr 19, 2015 4:38 am

Thank you.
John Robin Dove
 
Posts: 486
Joined: Thu Jan 23, 2014 4:35 am


Return to Web (DHTML) Development

Who is online

Users browsing this forum: No registered users and 2 guests

cron