Go Back   MarcomCentral (PTI) and FusionPro User Communities > Software-Related Talk > The JavaScript Library

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 28th, 2014, 06:42 AM
blackbelt60 blackbelt60 is offline
Junior Community Member
 
Join Date: Oct 2013
Posts: 17
Default round down number

Hello. I need to get the same results I get by running the Excel function floor(number; significance) , round down a number to the closer multiple of the significance value. That is, if I run floor(100000; 12) on Excel I get 99996 , which is the closer integer down, multiple of 12. Sorry I can't find any similar in JavaScript. Thank you. Maurizio
Reply With Quote
  #2  
Old January 28th, 2014, 07:53 AM
step's Avatar
step step is offline
Senior Contributor
 
Join Date: Jan 2010
Location: Charlotte, NC
Posts: 957
Default Re: round down number

Code:
var number = 100000;
var significance = 12;
return Math.floor(number / significance) * significance;
__________________
Ste Pennell
FusionPro VDP Creator 9.3.15
Adobe Acrobat X 10.1.1
Mac OS X 10.12

LinkedIn
Reply With Quote
  #3  
Old January 30th, 2014, 02:03 PM
blackbelt60 blackbelt60 is offline
Junior Community Member
 
Join Date: Oct 2013
Posts: 17
Default Re: round down number

Thank you very much ! Maurizio
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 11:42 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.