add an inverse function to the function block
what this would do is find the inverse of a number!
this means that a negative becomes a positive while a positive becomes a negetive!
here is a project that explains and shows this!
http://scratch.mit.edu/projects/killubear/1008554
please leave comment on what you think
Offline
killubear wrote:
add an inverse function to the function block
what this would do is find the inverse of a number!
this means that a negative becomes a positive while a positive becomes a negetive!
here is a project that explains and shows this!
http://scratch.mit.edu/projects/killubear/1008554
please leave comment on what you think
Not a bad idea , but it's already fairly simple to do. You can just do one of the following:
(( 0 <-> number ))
Or,
(( -1 <*> number ))
I hope you understand, and hopefully that helps with whatever you need that block for.
Offline
If you are creating a scrolling and shooting game than you must inverse. It means:
set scrollx to
0-(mouse x*2)
set scrolly to
0-(mouse y*2)
so if the mouse x is 2 for example, it is turned 4 and scrolled. If you dont inverse, its a total disaster. Dont believe me, try once inverse. And once normal.
Offline
if you just want the inverse of a negative number, you could use the absolute value block
Offline
raghsthebest wrote:
if you just want the inverse of a negative number, you could use the absolute value block
i agee but if you just have to make the block I came up with this:
http://scratchx.webs.com/apps/photos/photo?photoid=86480635
Offline
And I see sense in having this as a block.
BUT not as an official block. I think we can easily add too many blocks to the default block set.
Instead, allow users to create and add useful blocks like this to the website.
Then allow the community to vote on them. Popular, good ideas like this, will rise to the top and can be easily found, and added into projects.
Last edited by JTxt (2010-06-14 21:46:31)
Offline
I say no, because scratch is to teach programming languages and something this simple can be learned. Better now than when you move on to another language.
Offline