I am fairly new to Grasshopper and have a question.
I have created a rectangle with a domain using a slider and negative and then fed that into a move and rotate component that shifts the rectangle up on the Z axis. I then have used a length and division component and output into some panels to check rounding.
For some strange reason some of the results during the rotate function create 2 results with a .0 single decimal place. When these are run through the Round component, despite being 8.0, they are rounded down to 7 on the Floor output and the one prior is rounded up on the Ceiling output. See attached file. Why is this happening when all the results are and should be 8.
Yes I can see the R as a Format, but I do not understand entirely what that means. I think it means a “Real” number, which is a floating point number?
The division calculation should simply be dividing 80 by 10. It doesn’t really answer why a list of 80 or 80.0 in Grasshopper randomly decides that 80/10 or 80.0/10 is 8.00000000036 or 7.99999999973 - that is not mathematically correct. Is this a bug in the software?
I generally use an Expression component for rounding (or embed the expression in an output parameter). Using text as floating point input to downstream components can be slow if you’re dealing with large amounts of data.
Here’s a comparison rounding 1,000,000 random numbers on my old iMac running Rhino V7.