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

#1 2008-04-21 18:29:56

Hobbs1100
Scratcher
Registered: 2008-02-16
Posts: 500+

"sqrt" of 10?

I know sqrt means square root, but what do the other math functions for this block do?

<abs(


Along with abs, there are many more. What do they mean? I want to know so I can use scratch for more things. Thanks!

Offline

 

#2 2008-04-21 19:02:48

Jacobo
Scratcher
Registered: 2007-06-15
Posts: 100+

Re: "sqrt" of 10?

I've always wondered too. What are they for? In many 3-D projects I've noticed they're used.

Last edited by Jacobo (2008-04-21 19:03:20)


"It's like deja vu all over again"
-Yogi Berra

Offline

 

#3 2008-04-21 19:03:48

Zelda123
Scratcher
Registered: 2007-11-21
Posts: 1000+

Re: "sqrt" of 10?

Easy functions

Abs = Absolute Value
10^ = 10 to the power of #

These are much harder math functions used in about high school math and up.

Tan = Tangent
Sin = Sine
Cos = Cosine
Log = logarithm

Offline

 

#4 2008-04-21 19:07:59

Jacobo
Scratcher
Registered: 2007-06-15
Posts: 100+

Re: "sqrt" of 10?

look on the left of this page http://www.exslt.org/math/functions/tan/math.tan.html


"It's like deja vu all over again"
-Yogi Berra

Offline

 

#5 2008-04-21 19:14:02

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: "sqrt" of 10?

I have NEVER gotten the point of absolute value. Why not just write seven or something. Wait...


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#6 2008-04-21 19:26:18

Hobbs1100
Scratcher
Registered: 2008-02-16
Posts: 500+

Re: "sqrt" of 10?

Oh well. Next year, in Grade 7, I might learn some of that. I already know Power of and absoloute value.

Offline

 

#7 2008-04-21 21:07:14

Lucario621
Community Moderator
Registered: 2007-10-03
Posts: 1000+

Re: "sqrt" of 10?

Well,
-abs turns positive numbers to positive numbers, but negative numbers to positive numbers
-sqrt is the square root of the number. like 4 is 2 because 2x2=4, 49 is 7 because 7x7=49, so the number that you multiply to itself to get your number.
-sin and cos, sine and cosine, I'd use this to explain. Start a new project, and make two variables called "sine of direction" and "cosine of direction" with using the scratch cat.Add this script:
[blocks]
<when green flag clicked>
<forever>
<point towards( mouse
<set{   sine of direction   }to( sine of direction
<set{   cosine of direction   }to( cosine of direction
<end>

Also make sure you can see the value of the variable on the screen. Then click the green flag and move your mouse around and you'll notice that if the cat is pointing closer to the right the sine will be closer to 1, if its closer to the left it will be closer to -1 and with cosine its just with up and down. Add this in the forever loop and look at what happens:

<if><mouse down?>
<change x by(  sine of direction
<change y by(   cosine of direction
<end>

hope that helps.


http://i.imgur.com/WBkM2QQ.png

Offline

 

#8 2008-04-22 01:42:45

Mayhem
Scratcher
Registered: 2007-05-26
Posts: 1000+

Re: "sqrt" of 10?

Abs is very useful for finding the difference between 2 numbers as a positive number.

Variable a - variable b will give a negative answer if b is bigger.

Abs (Variable a - variable b) will always give a positive number.


Web-spinning Spider:  http://scratch.mit.edu/projects/Mayhem/18456
3D Dungeon Adventure:  http://scratch.mit.edu/projects/Mayhem/23570
Starfighter X: http://scratch.mit.edu/projects/Mayhem/21825
Wandering Knight: http://scratch.mit.edu/projects/Mayhem/28484

Offline

 

#9 2008-04-22 20:00:36

Jacobo
Scratcher
Registered: 2007-06-15
Posts: 100+

Re: "sqrt" of 10?

Hobbs1100  wrote:

Oh well. Next year, in Grade 7, I might learn some of that. I already know Power of and absoloute value.

I'm in 7th grade and we haven't learned any of the operations like these <abs( I don't even know what "power of and absoloute value" are.


"It's like deja vu all over again"
-Yogi Berra

Offline

 

#10 2008-04-22 21:35:54

heybrian_
Scratcher
Registered: 2008-04-04
Posts: 100+

Re: "sqrt" of 10?

Jacobo wrote:

i dont know what power of  is

You dont? I learned that in 4th grade!

Offline

 

#11 2008-04-23 14:36:21

Jacobo
Scratcher
Registered: 2007-06-15
Posts: 100+

Re: "sqrt" of 10?

Wait. Does he mean power of as in exponents? If so I know what he means. I learned it in 5th grade. Sometimes I feel like my school has the worst curriculums. I'm still learning stuff that I learned in 5th grade. It's so boring.


"It's like deja vu all over again"
-Yogi Berra

Offline

 

#12 2008-04-23 14:55:14

Zelda123
Scratcher
Registered: 2007-11-21
Posts: 1000+

Re: "sqrt" of 10?

Jacobo wrote:

Wait. Does he mean power of as in exponents? If so I know what he means. I learned it in 5th grade. Sometimes I feel like my school has the worst curriculums. I'm still learning stuff that I learned in 5th grade. It's so boring.

Yes, 2 to the 5th power is the same as 2^5.

Offline

 

#13 2008-04-23 15:09:44

Jacobo
Scratcher
Registered: 2007-06-15
Posts: 100+

Re: "sqrt" of 10?

Zelda123 wrote:

Yes, 2 to the 5th power is the same as 2^5.

Oh. I never knew about the ^ thing


"It's like deja vu all over again"
-Yogi Berra

Offline

 

#14 2008-04-25 16:44:04

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: "sqrt" of 10?

I learned I think beginning algebra in 5th grade


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#15 2008-04-26 06:56:05

Jacobo
Scratcher
Registered: 2007-06-15
Posts: 100+

Re: "sqrt" of 10?

I learned it as 2 with a little 5 in the corner.


"It's like deja vu all over again"
-Yogi Berra

Offline

 

Board footer