We need your help! 🔥
Please consider disabling your ad-blocker to support this website! 🔑
We are a free, community-supported website! 🥰
We only display small unobtrusive ads which help us stay online! 💯
Thank you in advance! ❤️
Color
Curve
Domain
List
Mesh
Number
Plane
Point
SubD
Surface
Transform
Twisted Box
Vector

Round To Decimal Place

Round a number to a decimal place or truncate a number at a decimal place.

Inputs

NameIDDescriptionType
Number XxNumber to roundNumber
Decimal PlacedDecimal place to round toInteger
Round TypeTDetermines how the number is rounded 0 = Nearest 1 = Floor / Truncate 2 = CeilingInteger

Outputs

NameIDDescriptionType
RoundedRResulting rounded number from rounding x to the decimal place The decimal places of this number can only be displayed up until the amount set in Grasshopper's formatting options (File>Preferences>Display>Formatting), those settings only change how a number is displayed, they do not change the actual value of the number itself. Additionally, unecessary trailing zeros won't be displayed because of Grasshopper.Number
DifferenceDThe difference between the resulting rounded number and the input number xNumber

Video Tutorials

Site design © Robin Rodricks.   Pufferfish and associated data © 2024 Michael Pryor.  
Rhinoceros and Grasshopper are registered trademarks of Robert McNeel & Associates.  Hosted by GitHub

Report an Issue  |  Terms of Service