This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2008-11-29 21:51:29

bart9032
Scratcher
Registered: 2008-06-16
Posts: 100+

math functions in scratch

Alright, i know these math functions in scratch: abs which makes a negative number a positive, sin which is based on a function of a number, e^ which makes an even an odd, asin which is the opposite of sin, sqrt which I know only a little about, cos tan and sin are all trig as well but I don't know any others.
P.S. can we have an o^ function which changes an odd number to an even number?


Hi, my name is Bartholomew JoJo 'Bart' Simpson. Nice to meet you,
Actually, no I am not Bart Simpson. I am bart9032  cool

Offline

 

#2 2008-11-29 21:58:09

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: math functions in scratch

I want the rest of the trig functions atan2 asin2 and acos2.

Also, check google to get explanations for the math functions.

Last edited by archmage (2008-11-29 21:59:06)


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#3 2008-11-29 22:11:54

neji55
Scratcher
Registered: 2008-11-29
Posts: 2

Re: math functions in scratch

hi hi

Offline

 

#4 2008-11-29 22:31:52

big-bang
Scratcher
Registered: 2008-02-21
Posts: 1000+

Re: math functions in scratch

we need a +/- converter NOW!!!!!


http://i47.tinypic.com/6edrbm.jpghttp://i45.tinypic.com/dw9hmw.jpghttp://i50.tinypic.com/f28tvn.jpghttp://i45.tinypic.com/ruwaop.jpg

Offline

 

#5 2008-11-30 04:01:28

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: math functions in scratch

bart9032 wrote:

Alright, i know these math functions in scratch: abs which makes a negative number a positive, sin which is based on a function of a number, e^ which makes an even an odd, asin which is the opposite of sin, sqrt which I know only a little about, cos tan and sin are all trig as well but I don't know any others.
P.S. can we have an o^ function which changes an odd number to an even number?

I think you may be looking for the Round function here...it converts from a decimal number (like 2.3987) to the nearest whole number (such as 2).  Note that if you right-click (Alt-click for Mac users) on some of the number blocks and select Help, it will tell you what it does.  It doesn't give you a lot of help with the block that has the drop-down list of functions.  The full names of those functions are:

   abs  (absolute value)
   sqrt (square root)
   sin (sine)
   cos (cosine)
   tan (tangent)
   asin (arcsine)
   acos (arccosine)
   atan (arctangent)
   ln (natural logarithm)
   log (log base 10)
   e^ (exponential)
   10^ (raise 10 to a given power)

but it would take too long to explain them all here...some of them require high school math too.  However, with the full names above, you can look them up in Wikipedia.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#6 2009-10-21 19:04:02

oldman83
Scratcher
Registered: 2009-09-12
Posts: 1

Re: math functions in scratch

I am trying to draw a sine wave using the sin function. I have tried  using radians so that I can show a complete cycle. (360 deg.= 6.28 radians) radians are the  x axis and y as the sin. Simply Y=sin(x)

Offline

 

#7 2009-10-25 11:32:16

Greatdane
Scratcher
Registered: 2007-06-05
Posts: 1000+

Re: math functions in scratch

big-bang wrote:

we need a +/- converter NOW!!!!!

Multiply or divide by -1.


The future belongs to those who believe in the beauty of their dreams.
        ~ Eleanor Roosevelt

Offline

 

#8 2009-11-06 18:21:23

UGWG
Scratcher
Registered: 2009-11-02
Posts: 40

Re: math functions in scratch

HOW OLD R U GRATEDANISH OH YES BELOW IS A SCRATCH SCRIPT

[blocks]http://scratch.mit.edu/forums/viewtopic.php?id=12126#req_message http://scratch.mit.edu/forums/viewtopic.php?id=12126#req_message[/blocks] BE NICE!

Offline

 

#9 2009-11-06 18:29:24

UGWG
Scratcher
Registered: 2009-11-02
Posts: 40

Re: math functions in scratch

I AM 8 1/2 AS OF 11/06/09 in ENGLISH 06/11/09 IN ESPANOL

Offline

 

#10 2009-11-09 00:22:45

Flait7
Scratcher
Registered: 2008-04-14
Posts: 100+

Re: math functions in scratch

ugwg why are you yelling? xP


http://scratch.mit.edu/static/projects/Flait7/2248016_sm.pnghttp://scratch.mit.edu/static/projects/Flait7/1827934_sm.png

Offline

 

#11 2009-11-16 15:24:14

UGWG
Scratcher
Registered: 2009-11-02
Posts: 40

Re: math functions in scratch

I was not yelling. There will be no other functions. All of the functions are trigonometry. Did I spell that right? I hope I did.

Offline

 

#12 2009-11-16 15:32:48

UGWG
Scratcher
Registered: 2009-11-02
Posts: 40

Re: math functions in scratch

Square roots are the value n in this case and x is the number you are getting the square root of. It always satisfies this equation. n*n=x Cubed roots are similar, except it is (n*n)*n=x And they go on, but then, you must say x to the power of 1/4 or 1/5 etc.. It is basically just powers of fractions where 1 is always the numerator. If you don't understand, search square roots on Wikipedia. How to get approximate square roots, cubed roots, etc.: First, find the closest square numbers to your number, then just follow the instructions below to turn it into a mixed number. By the way, I thought of this formula.
larger sq. number - smaller sq. number=denominator
number you want to get the sq. root of - smaller sq. number=numerator
sq. rt. of smaller sq. number=whole number
I hope you find this a useful guide to sq. roots.

Offline

 

#13 2009-11-16 15:34:16

UGWG
Scratcher
Registered: 2009-11-02
Posts: 40

Re: math functions in scratch

What is irony? I just wanted to know.

Offline

 

#14 2009-11-16 15:40:40

UGWG
Scratcher
Registered: 2009-11-02
Posts: 40

Re: math functions in scratch

big bang wrote:

we need a +/- converter NOW!!!!!

big bang, 1 is the identity property of multiplication. You seriously should have thought of that. Or, you could say "say answer * -5 / 5" Chez pantz, you really should have thought better!

Offline

 

#15 2009-11-16 15:41:49

UGWG
Scratcher
Registered: 2009-11-02
Posts: 40

Re: math functions in scratch

How do you make a post signature?
---------------------------------------------------------------------------------------
I dont know

Offline

 

Board footer