IPB

Welcome Guest ( Log In | Register )

> foobar2000 General Forum Rules

This is NOT a tech support forum.
Tech support questions go to foobar2000 Tech Support forum instead.

See also: Hydrogenaudio Terms of Service.

 
Reply to this topicStart new topic
Rounding Function
garthwen
post Jan 21 2010, 07:35
Post #1





Group: Members
Posts: 21
Joined: 13-December 08
Member No.: 64437



What functions can I use to round a number like 29.949 to 30.0, or from 12.680 to 12.7?
Go to the top of the page
+Quote Post
2E7AH
post Jan 21 2010, 07:49
Post #2





Group: Validating
Posts: 2424
Joined: 21-May 08
Member No.: 53675



$num(%field%,1) will round to integer
you should probably use $replace(%field%,.,) then $left() plus $add(,5) somewhere in between to do the rounding
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 23rd October 2014 - 05:43