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

#1 2007-07-19 15:21:06

Dave911
Scratcher
Registered: 2007-06-27
Posts: 36

More advanced mathematical values

I don't know if this has already been suggested but maybe more advanced mathematical methods like sine, cosine, x^y etc. I don't think this would need to be in all the scratch programming as it would probably confuse a lot of the minors but perhaps as an expansion part to scratch. Basically I was attempting to make a CPU player understand the probability of a certain roll of numerous dice and a lot of the script work could be vastly reduced if I had the x ^ y function.

Thanks.

Offline

 

#2 2007-07-20 07:05:34

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: More advanced mathematical values

Several people have previously requested more access to math functions.  I, for one, agree that there should be more.  You can find implementations for some of them in my RPN_calculator project:  http://scratch.mit.edu/projects/kevin_karplus/2164

I don't have y^x implemented, though, because I haven't implemented log yet, and that is needed for doing y^x with non-integer x.

Offline

 

#3 2007-07-20 07:30:24

bigB
Scratcher
Registered: 2007-06-09
Posts: 100+

Re: More advanced mathematical values

on the point of 'confusing minors' im not sure having trig functions would be any more confusing to less experienced scratchers than 'abs' and 'mod'. also i would assume that the majority of less experienced users dont really use the number section much at all. 
(you could even only show 'sin' as if you notice right clicking on blocks allows you to change them and you could then change to cos or tan.)


http://scratch.mit.edu/projects/bigB/260981 Draw to Text
http://scratch.mit.edu/projects/bigB/181829 3D Stunt Flyer

Offline

 

#4 2007-07-20 08:18:13

natalie
Scratch Team
Registered: 2007-03-07
Posts: 100+

Re: More advanced mathematical values

I believe a block with trig functions (pull down to choose) is on the list for future Scratch additions.

Offline

 

Board footer