• Login
sketchucation logo sketchucation
  • Login
🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

Math module? Where is the information in API

Scheduled Pinned Locked Moved Developers' Forum
7 Posts 4 Posters 1.4k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    Wo3Dan
    last edited by 26 Jan 2011, 22:24

    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.

    1 Reply Last reply Reply Quote 0
    • T Offline
      TIG Moderator
      last edited by 26 Jan 2011, 22:34

      This is a list of most functions outside of Skethcup's own...
      http://www.ruby-doc.org/docs/ProgrammingRuby/html/builtins.html

      Math functions are here...
      http://www.ruby-doc.org/core/classes/Math.html

      Also Math::PI give 'pi' and rand gives a random number 0 to 1 or rand(5) 1,2,3,4 or 5

      This site has most available standard Ruby Modules, Classes and Methods...

      TIG

      1 Reply Last reply Reply Quote 0
      • T Offline
        thomthom
        last edited by 26 Jan 2011, 22:48

        @tig said:

        Math functions are here...
        http://www.ruby-doc.org/core/classes/Math.html

        That'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.

        Thomas Thomassen — SketchUp Monkey & Coding addict
        List of my plugins and link to the CookieWare fund

        1 Reply Last reply Reply Quote 0
        • T Offline
          TIG Moderator
          last edited by 26 Jan 2011, 22:54

          ...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...

          TIG

          1 Reply Last reply Reply Quote 0
          • W Offline
            Wo3Dan
            last edited by 26 Jan 2011, 22:55

            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.

            1 Reply Last reply Reply Quote 0
            • T Offline
              thomthom
              last edited by 26 Jan 2011, 22:59

              The index page for the 1.8.6 docs: http://www.ruby-doc.org/core-1.8.6/

              Thomas Thomassen — SketchUp Monkey & Coding addict
              List of my plugins and link to the CookieWare fund

              1 Reply Last reply Reply Quote 0
              • G Offline
                Gaieus
                last edited by 26 Jan 2011, 23:34

                @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.

                Gai...

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                1 / 1
                • First post
                  1/7
                  Last post
                Buy SketchPlus
                Buy SUbD
                Buy WrapR
                Buy eBook
                Buy Modelur
                Buy Vertex Tools
                Buy SketchCuisine
                Buy FormFonts

                Advertisement