sketchucation logo sketchucation
    • Login
    ℹ️ GoFundMe | Our friend Gus Robatto needs some help in a challenging time Learn More

    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.
    • Wo3DanW Offline
      Wo3Dan
      last edited by

      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
      • TIGT Offline
        TIG Moderator
        last edited by

        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
        • thomthomT Offline
          thomthom
          last edited by

          @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
          • TIGT Offline
            TIG Moderator
            last edited by

            ...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
            • Wo3DanW Offline
              Wo3Dan
              last edited by

              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
              • thomthomT Offline
                thomthom
                last edited by

                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
                • GaieusG Offline
                  Gaieus
                  last edited by

                  @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
                  • First post
                    Last post
                  Buy SketchPlus
                  Buy SUbD
                  Buy WrapR
                  Buy eBook
                  Buy Modelur
                  Buy Vertex Tools
                  Buy SketchCuisine
                  Buy FormFonts

                  Advertisement