sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    ⚠️ Update | Sketchucation Tools 5.0.8 released with licensing improvements and bugfixes Download

    Math module? Where is the information in API

    Scheduled Pinned Locked Moved Developers' Forum
    7 Posts 4 Posters 1.6k Views 4 Watching
    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
      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
        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
          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
            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
              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
                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
                  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

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

                  Advertisement