Some extra math functions
60 posts • Page 3 of 3 • 1, 2, 3
Re: Some extra math functions
canadian joe wrote:HOW DO PEOPLE COME UP WITH THESE KINDS OF SCRIPTS! Compared to this script i have the skills of a cheesecake..............a dead cheesecake. I probably just don't know scripting language that well
yea I don't know really much about scripting too.... I know some normal things like some variables and spawning...
I like crashes alot!
-
Mr. crash - Posts: 266
- Joined: Fri Sep 18, 2009 9:56 pm
- Location: Joensuu, Finland
Re: Some extra math functions
When i started thyme all i could do was copy and paste code into the console from there i worked my ways up, every time i saw a scene i would work out how the codes work (With the exception of kilinch's scenes )
-
Mystery - Posts: 2802
- Joined: Thu Sep 03, 2009 1:16 pm
- Location: Southern Australia
Re: Some extra math functions
Mystery wrote:When i started thyme all i could do was copy and paste code into the console from there i worked my ways up, every time i saw a scene i would work out how the codes work (With the exception of kilinch's scenes )
Same but I know a programming language so thyme became easy to learn. Kilinch's scenes aren't that complicated. All he does it but things down to there basics and then codes it from there.
<- Designed by PhysicsGuy
-
xplane80 - Posts: 498
- Joined: Mon Aug 31, 2009 7:28 pm
Re: Some extra math functions
The level of math Kilinch uses is beyond what I've learnt the code structure i can understand perfectly.
-
Mystery - Posts: 2802
- Joined: Thu Sep 03, 2009 1:16 pm
- Location: Southern Australia
Re: Some extra math functions
It was easy to learn and I've never programmed before ;P
make sure to check out my work.
-
Rideg - Posts: 948
- Joined: Tue Dec 15, 2009 5:17 pm
- Location: Östersund, Sweden
Re: Some extra math functions
Rideg wrote:It was easy to learn and I've never programmed before ;P
Learning time isn't hard. In fact, it is really easy.
Just follow a thyme tutorial off the forums or if you really want so more help, I *might* make a video tutorial for everyone.
<- Designed by PhysicsGuy
-
xplane80 - Posts: 498
- Joined: Mon Aug 31, 2009 7:28 pm
Re: Some extra math functions
yes I always use that do keep the code length down and cuz Ima lazy
make sure to check out my work.
-
Rideg - Posts: 948
- Joined: Tue Dec 15, 2009 5:17 pm
- Location: Östersund, Sweden
Re: Some extra math functions
About the logarithm-coding with thyme: I used
which returns [a/2^highestpowerof2,highestpowerof2]
then i do
which gives e.g. ln(1.999)= 0.69264704
nice in comparison to the real 0.692647055
or ln(12345)=9.421007
nice in comparison to the real 9.4210064
There are built-in-functions now for logarithm now, which are
math.log for natural logarithm, and
math.log10 for the base 10 log.
- Code: Select all
scene.my.intln2of:=(a,b)=>{
{a>2}?{c=a/2.0;d=b+1;scene.my.intln2of(c,d)}:{[a,b]}}
which returns [a/2^highestpowerof2,highestpowerof2]
then i do
- Code: Select all
scene.my.logar:=(k)=>{m=scene.my.intln2of(k,0); q=m(0);r=m(1);
t=q^0.125;
x=t-1;
xx=x*x;
xxx=xx*x;
xxxxxx=xxx*xxx;
z=x-xx/2+xxx/3-xxx*x/4+xxx*xx/5-xxxxxx/6+xxxxxx*x/7-xxxxxx*xx/8+xxxxxx*xxx/9;
resu=r*0.6931471806+8*z;
}
which gives e.g. ln(1.999)= 0.69264704
nice in comparison to the real 0.692647055
or ln(12345)=9.421007
nice in comparison to the real 9.4210064
There are built-in-functions now for logarithm now, which are
math.log for natural logarithm, and
math.log10 for the base 10 log.
-
DrAgon - Posts: 31
- Joined: Tue Feb 12, 2013 4:03 pm
Re: Some extra math functions
That was a massive bump! 7 years...
- The Linkage
- Posts: 57
- Joined: Fri Aug 05, 2011 5:40 pm
- Location: Escobar, Argentina
60 posts • Page 3 of 3 • 1, 2, 3
Who is online
Users browsing this forum: No registered users and 9 guests