Grasshopper

algorithmic modeling for Rhino

On the maths toolbar there is a % (Modulus) operator component.  But I can't find the same function within the expression editor.  Is it available?  I don't find anything listed.  If I enter something like Mod(x/y) I get an error "Syntax error: Invalid expression: Unexpected symbol encountered (%)"

Also, what is the difference between these two functions:  "Fix" and "Int"?

Views: 2202

Replies to This Discussion

The difference between Int and Fix is that if number is negative, Int returns the first negative integer less than or equal to number, whereas Fix returns the first negative integer greater than or equal to number. For example, Int converts -8.4 to -9, and Fix converts -8.4 to -8.

(copied from the webosphere)

--

David Rutten

david@mcneel.com

There is no modulo operator in the scripting language.

--

David Rutten

david@mcneel.com

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2025   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service