• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

round to nearest quarter

Explorer ,
Nov 17, 2021 Nov 17, 2021

Copy link to clipboard

Copied

Hi,

How do I round this numbers?

10.24 = 10

10.26 = 10.5

10.74 = 10.5

10.76 = 11

in Excel the function is MROUND or CEILING

TOPICS
Scripting

Views

262

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Nov 17, 2021 Nov 17, 2021

Simple math: You divide you value by the quantifier, round it and multiply it by the quantifier. In Javascript:

 

Math.round(value/0.5)*0.5

 

Mylenium

Votes

Translate

Translate
Adobe
LEGEND ,
Nov 17, 2021 Nov 17, 2021

Copy link to clipboard

Copied

Simple math: You divide you value by the quantifier, round it and multiply it by the quantifier. In Javascript:

 

Math.round(value/0.5)*0.5

 

Mylenium

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 17, 2021 Nov 17, 2021

Copy link to clipboard

Copied

LATEST

check this thread on the "Related conversations", there's a function to round to the nearest quarter, it can be easily edited to round to nearest half

 

https://community.adobe.com/t5/acrobat-sdk-discussions/how-to-hide-trailing-zeros-in-a-number-roundi...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines