Math module? Where is the information in API
-
Is it that I'm blind or what?
I've read: ....As mentioned previously, Ruby provides an extensive range of math related methods. This is in some information on the internet. But I can't find anything in Google SketchUp Ruby API, or anywhere in the documentation.
Could someone please point me to a list of all Math related methods and constants in the API?
Very much appreciated. -
This is a list of most functions outside of Skethcup's own...
http://www.ruby-doc.org/docs/ProgrammingRuby/html/builtins.htmlMath functions are here...
http://www.ruby-doc.org/core/classes/Math.htmlAlso
Math::PIgive 'pi' andrandgives a random number 0 to 1 orrand(5)1,2,3,4 or 5This site has most available standard Ruby Modules, Classes and Methods...
-
@tig said:
Math functions are here...
http://www.ruby-doc.org/core/classes/Math.htmlThat's the 1.9 docs - 1.8.6 is here: http://www.ruby-doc.org/core-1.8.6/classes/Math.html
1.9 docs lists many methods and classes that doesn't exist in 1.8. -
...AND as thomthom points out Sketchup uses the older Ruby 1.8 version and not the current 1.9...
Sorry for the mis-link... however, I suspect that you will hardly be using anything more than the most basic sin/cos/tan/sqrt etc anyway... -
Thanks TIG and Thomas.
I noticed the newer version, yes. But what a relief, these list
Much better than the few I had mentioned in the short list I had.
Thought I was going insane, running around in circles. -
The index page for the 1.8.6 docs: http://www.ruby-doc.org/core-1.8.6/
-
@unknownuser said:
Now I get it! thanks- i had no idea sketchup used the old version

So it seems this was the only thing that bothered you. Good.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better đź’—
Register LoginAdvertisement