algorithmic modeling for Rhino
So I am trying to use the round function. From the expression editor function list is says
Round(x[,d])
The issue is when I type this in I get an invalid expression (1519)
I am sure I don't have something correct with the syntax, but can't figure it out. Anybody else run into this problem.
Dennis
Tags:
Figured it out. Instead of Round(x[,d])
it's Round(x,d).
Not sure why the square brackets are listed.
Hi Dennis,
square brackets indicate optional arguments in VB documentation notation. So you can type both Round(x) and Round(x, d)
--
David Rutten
david@mcneel.com
Poprad, Slovakia
I think you need to set the variable a = math.round() result. Right now you are just setting a = to the original values inputted.
Something like this
RoundValue = math.round(x,2)
A= RoundValue
Syntax for grasshopper expressions and Visual Basic code is different. In this case, the function doesn't do anything because you do not store the return value. It should read:
x = Math.Round(x, 2)
Print(x)
A = x
--
David Rutten
david@mcneel.com
You guys are awesome
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by