Browse Search Popular Register Upload Rules User list Login:
Search:
More Functions

Image:
screenshot of the scene

Author: lololoer

Group: Default

Filesize: 31.24 kB

Date added: 2014-02-21

Rating: 6.5

Downloads: 760

Views: 423

Comments: 10

Ratings: 5

Times favored: 0

Made with: Algodoo v2.1.0

Tags:

Scene tag

Array functions.
If you use them, please give me credit.
Please log in to rate this scene
edit
Similar scenes
Title: Oncollides as functions
Rating: 5
Filesize: 16.91 kB
Downloads: 719
Comments: 4
Ratings: 1
Date added: 2011/06/08 16:08:00
Made with: Algodoo before v1.8.5
Rating: rated 5
download
Title: Lesson 001: Registering and basic menu functions
Rating: 6
Filesize: 89.37 kB
Downloads: 331
Comments: 0
Ratings: 3
Date added: 2016/02/02 20:07:57
Made with: Algodoo v2.1.0
Rating: rated 6
download
Title: Strings functions examples (Thyme)
Rating: 5.625
Filesize: 23.24 kB
Downloads: 582
Comments: 1
Ratings: 2
Date added: 2010/02/27 22:14:52
Made with: Algodoo before v1.8.5
Rating: rated 5.6
download
Title: Array Functions
Rating: 6.3
Filesize: 115.11 kB
Downloads: 384
Comments: 18
Ratings: 4
Date added: 2020/03/27 23:01:01
Made with: Algodoo v2.1.0
Rating: rated 6.3
download
Title: Attraction Script Engine
Rating: 5
Filesize: 47.99 kB
Downloads: 426
Comments: 1
Ratings: 1
Date added: 2017/09/16 23:05:42
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: String Functions
Rating: 5.6667
Filesize: 94.01 kB
Downloads: 297
Comments: 11
Ratings: 3
Date added: 2020/03/31 05:38:17
Made with: Algodoo v2.1.0
Rating: rated 5.7
download
Good work. :tup:
But for rounding easer use this: "math.toInt(x + 0.5)"
Excellent scene! Please make more of these scenes with more useful functions! :tup:
What is this?: pos = _pos + [sin(cos(sin(sim.time + math.pow(p(0), p(0))))), cos(sin(cos(sim.time + math.pow(p(1), p(0)))))] + [-0.5, -1]

Please explain what that line of script does and how it works. I know that it moves the circle, but why did you make it so complex?

Thanks
Last edited at 2014/02/21 21:44:44 by Xray
Thankyou guys.
Chemist - Oh I didn't know that, thankyou!
Xray - I maded that script just to make the most randomness as possible and making it complex helpt me to do it, Thankyou.

:tup:
Here is another rounding function. It round number N to D decimal places.

Scene.my.Round = (n,d) => {math.tofloat(math.toint(n * 10 ^ d + .5) / 10 ^ d)}

Examples: Scene.my.Round(1.336,0) = 1, Scene.my.Round(1.336,1) = 1.3, Scene.my.Round(1.336,2) = 1.34
When digital readouts are difficult to read because of jitter from too many decimal places being displayed, use this code to reduce the precision and smooth the jitter (the constant 10000 can be changed to change the digits of precision. The number of zeros == the number of decimal places)....

math.tofloat(math.toint((variable or equation) *10000)) / 10000
Thankyou guys.

TheBumpkin - I see that you subscribed a closed time ago, then how the hell do you know that?
Good work man!

Just make an equation that calculates when a polygon is inside of an entity(like a collision detector) and you finish;)
:tup:
Last edited at 2014/03/05 03:36:31 by Luezma
Luezma - Kilinich already did that: Mouse over Polygon Effect
Last edited at 2014/03/05 05:16:51 by Xray
Luezma, I thoungth exactly the same!!, I think that detecting when a surface is in a polygon is possible using (as Xray mentioned) kilinich function over polygon + xFor function + AnyOf function, when I saw Bumpkin's "space rocks" scene I thougth that detecting when colliding (not physicly) was possible.

The only bad thing is the lag...
Last edited at 2014/03/06 12:52:56 by lololoer