generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Sine, cosine, tangent

Previous Thread :: Next Thread 
snowwolf is not online. snowwolf
Joined: 23 Nov 2006
Total Posts: 357
30 Oct 2012 07:15 PM
Does anyone know how to add sine, cosine, and tangent in a script?

would this work if I wrote that in a script:

sin(90)

would that give me 1?

also would it measure in degrees or radians?
Report Abuse
snowwolf is not online. snowwolf
Joined: 23 Nov 2006
Total Posts: 357
30 Oct 2012 07:17 PM
Or do I use

math.sin(x)
Report Abuse
BlueTaslem is not online. BlueTaslem
Joined: 11 May 2008
Total Posts: 11060
30 Oct 2012 07:19 PM
math.sin
math.cos
math.tan
math.acos
math.asin
math.atan

are the trigonometric functions in Lua.

Note that the angles are measured in RADIANS not DEGREES (there are 2*pi radians in a circle as opposed to 360 degrees). You can use
math.rad
to convert degrees to radians.
Report Abuse
snowwolf is not online. snowwolf
Joined: 23 Nov 2006
Total Posts: 357
30 Oct 2012 07:19 PM
Also how do I write the inverse like sin^-1
Report Abuse
BlueTaslem is not online. BlueTaslem
Joined: 11 May 2008
Total Posts: 11060
30 Oct 2012 07:22 PM
math.asin

asin, or arcsin is often how inverse sine is written in mathematics, and most languages use the convention of placing 'a' at the beginning.
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
30 Oct 2012 07:23 PM
I believe the arc trigonometric functions are the inverse ones.

¤¤ †KMXD† ¤¤
Report Abuse
snowwolf is not online. snowwolf
Joined: 23 Nov 2006
Total Posts: 357
30 Oct 2012 07:23 PM
Woo! Thanks!
Report Abuse
epicfail22 is not online. epicfail22
Joined: 25 Sep 2009
Total Posts: 3739
30 Oct 2012 07:24 PM
I'm taking Trig this year, kinda curious as to how it works.
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
30 Oct 2012 07:25 PM
*drools*

There is so much cool stuff you can use those functions for!

<3
Report Abuse
rayoma is not online. rayoma
Joined: 13 Nov 2009
Total Posts: 1911
30 Oct 2012 08:08 PM
> *drools*

Drooling over trig functions? That's a bit creepy...
Report Abuse
epicfail22 is not online. epicfail22
Joined: 25 Sep 2009
Total Posts: 3739
30 Oct 2012 08:14 PM
lul
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
30 Oct 2012 08:16 PM
"Drooling over trig functions? That's a bit creepy..."

Oh come on now. Everybody here should know I'm a huge nerd. :D
Report Abuse
XxChopSlaperxX is not online. XxChopSlaperxX
Joined: 09 Nov 2010
Total Posts: 3112
30 Oct 2012 08:20 PM
i liek dat nerdz :)

deathCast();
Report Abuse
rayoma is not online. rayoma
Joined: 13 Nov 2009
Total Posts: 1911
30 Oct 2012 08:22 PM
Doesn't mean you have to get your slobber all over my work! D:<
Report Abuse
Woodstauk4 is not online. Woodstauk4
Joined: 27 Dec 2010
Total Posts: 3061
30 Oct 2012 08:39 PM
you forgot cosecant secant and cotangent they are the best onesn asdbkwueduberukacbfrfyubwcnrfe

all students take calculas111222
Report Abuse
mamaguy is not online. mamaguy
Joined: 07 Oct 2010
Total Posts: 7073
30 Oct 2012 08:45 PM
@wood
wat.
@Epic
What year of school are you in? ;o
We take it in junior year here, although that's too long for me, so I'm gonna learn the basics of it in 8th grade :L
Report Abuse
Woodstauk4 is not online. Woodstauk4
Joined: 27 Dec 2010
Total Posts: 3061
30 Oct 2012 08:59 PM
cosecant = sine inverse
secant = cosine inverse
cotangent = tu madre

all students take calculus is a w/e u call it

A S T C

first quadrant: (A) All 3 (well, 6) of above are positive
second quadrant: (S) Sine (and cosecant) is positive
third quadrant: (T) tangent (and cotangent) is positive
fourth quadrant: (C) cosine (and secant) are positive

kthx

ALL STUDENTS TAKE CALCULAS1111
Report Abuse
kert109 is not online. kert109
Joined: 31 Dec 2009
Total Posts: 681
30 Oct 2012 09:28 PM
@AgentFirefox

I do!-- not.

epicFunction("kert109",1337,"max")
//Beat that function! o3o
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
30 Oct 2012 09:31 PM
fer all who don't know cotangent, it's cosine/sin

¤¤ †KMXD† ¤¤
Report Abuse
crazyman32 is online. crazyman32
Joined: 13 Apr 2008
Total Posts: 18027
30 Oct 2012 10:00 PM
I'll stick with addition.
Report Abuse
XxChopSlaperxX is not online. XxChopSlaperxX
Joined: 09 Nov 2010
Total Posts: 3112
30 Oct 2012 10:00 PM
okey ;)

deathCast();
Report Abuse
XxChopSlaperxX is not online. XxChopSlaperxX
Joined: 09 Nov 2010
Total Posts: 3112
30 Oct 2012 10:01 PM
Ahh, crazy, any tips for learning Java?

deathCast();
Report Abuse
crazyman32 is online. crazyman32
Joined: 13 Apr 2008
Total Posts: 18027
30 Oct 2012 10:03 PM
Idk, I literally just learned mostly by googling stuff. Java is very well documented and there are tons of old forum threads of just about anything you would want to know. And practice it a lot.

Java overall is a quite simple language to learn. It just takes a bit of time to get down the mechanics to it, especially if you started off with Lua like I did.
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
30 Oct 2012 10:04 PM
All programming languages share program flow. The NATURE of how the languages work are identical. The SYNTAX is what messes people up.
Report Abuse
BlueTaslem is not online. BlueTaslem
Joined: 11 May 2008
Total Posts: 11060
31 Oct 2012 05:23 PM
That isn't true at all, you need an education in Computer Science.

See, Turing Machines, Cellular Automaton, Haskell, Lisp, Malbolge, Prolog.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image