# DiscussionSin/Cos?

#### kingkingyyk3

##### Visitor (Welcome to the Jungle, Baby!)
I just found Warcraft 3's Sin and Cos function are weird.

Correct :

Tested Sin/Cos, both resulted same look.
Literate through 0->1440 for x and 300*scale for y-axis.
Any idea? :nuts:

#### Weep

##### Godspeed to the sound of the pounding
Literate through 0->1440 for x and 300*scale for y-axis.
That's an awfully big number for a function that takes radians.

If that's not it, post your code?

Cool-looking pattern, though...

Staff member

#### kingkingyyk3

##### Visitor (Welcome to the Jungle, Baby!)
2 * pi rad = 360 degree

Tangent

Sin 3x

Cos 3x

#### Weep

##### Godspeed to the sound of the pounding
Radians are just another unit of measurement for angle.

Degrees break a full rotation up into 360 divisions, whereas 2(pi) radians complete a rotation. This is handy because circular measurements naturally depend on pi. For example, the length along the edge of a circular sector is simply radius*angle (in radians).

The ratio is..

#### kingkingyyk3

##### Visitor (Welcome to the Jungle, Baby!)
1 degree = ~0.175rad or (pi / 180)

#### kingkingyyk3

##### Visitor (Welcome to the Jungle, Baby!)
Perhaps I post the script for you all to test it.
JASS:
``````library GraphViewer

function interface GetY takes real x returns real

globals
private constant string Model = &quot;Abilities\\Weapons\\RedDragonBreath\\RedDragonMissile.mdl&quot;
private constant string AxisModel = &quot;Abilities\\Weapons\\GreenDragonMissile\\GreenDragonMissile.mdl&quot;
private GetY equation
private timer t = CreateTimer()
private real xD = 0.
private real x = 0.
private real s
endglobals

private function GenerateGraph takes nothing returns nothing
if xD &gt; 0. then
set xD = xD - .07
set x = x + .07
call AddSpecialEffect(Model,x * s,equation.evaluate(x) * s)
else
call PauseTimer(t)
endif
endfunction

function ShowGraph takes GetY y, real times, real scale returns nothing
set equation = y
set xD = times * 2
set s = scale
set x = -times
call TimerStart(t,0.0,true,function GenerateGraph)
endfunction

private struct Initializer extends array
private static method onInit takes nothing returns nothing
set xD = -2000.
loop
exitwhen xD &gt;= 2000.
set xD = xD + 100.
endloop
endmethod
endstruct
endlibrary``````

JASS:
``````library MapInit initializer Init requires GraphViewer
private function Equation takes real x returns real
return 3 - x - (4 * x * x) //Equation of line
endfunction
//don't touch any thing below here.
private function Init takes nothing returns nothing
call FogEnable(false )
call SetCameraField(CAMERA_FIELD_ZOFFSET,3000.,0.)
call SetCameraField(CAMERA_FIELD_ANGLE_OF_ATTACK,270.,0.)
call PanCameraTo(0.,0.)
call ShowGraph(Equation,6.284,300.)
endfunction
endlibrary``````

#### SineCosine

##### I'm still looking for my Tangent
HEY!

I put in the symbol for pi in my post, but the forum thingy made it into a question mark, wtf!

Lemme' try again..

???????????????

Nope.

#### monoVertex

##### I'm back!
HEY!

I put in the symbol for pi in my post, but the forum thingy made it into a question mark, wtf!

Lemme' try again..

???????????????
The font set does not support it. Put it as an image .

#### SineCosine

##### I'm still looking for my Tangent
Looks like I got beat to it =/

_
|L

#### SineCosine

##### I'm still looking for my Tangent
That just looks fugly ._.

#### Weep

##### Godspeed to the sound of the pounding
Well, what're ya gonna do.

The worst part is that it (pi ? ?) displays correctly when hitting "Preview Post" but not in the post itself.

#### SineCosine

##### I'm still looking for my Tangent
Haha, this thread has been derailed.

#### saw792

##### Is known to say things. That is all.
1 degree = ~0.175rad or (pi / 180)
Let me bring it back!

180 degrees = pi radians, not 1 radian. 1 radian is defined as the angle formed from a sector of a circle where the radius of the circle = the arc length.

#### Bribe

##### vJass errors are legion
My favorite is when I see noobs using the inlined versions of AngleBetweenPoints and PolarProjectionBJ, because you've got bj_RADTODEG to get the angle, and then a bj_DEGTORAD to utilize the angle

General chit-chat
Help Users
• The Helper:
Is that going to be a full game now tom?
• The Helper:
what is this Ghan? https://enterprise.ghannet.com/ you are totally holding out on us my friend
• Ghan:
Not mine, I just ran the server. They let the domain expire but it was a cool project so I kept it alive there.
• Ghan:
Used to be enterpriserpg.com I think.
• The Helper:
If you go to the world editor tutorials site and click the starcraft link it takes you there
• Ghan:
lol
• Ghan:
I forgot about that alias name. (The full URL still went to the correct site.) That should be fixed.
• Ghan:
Silkroad Forums site really needs help.
• Ghan:
Its software has been out of support since 2017.
• Ghan:
The woes of using custom styles....
• The Helper:
does anyone still use silk road forums?
• Ghan:
It's about as active as here I'd say. Not much going on.
• Wizard:
I think it doesn't help that the silk road game isn't as popular any more I think. The only MMO I play these days is FFXIV like most other people I know.
• The Helper:
I checked a status page for players and it says the game has 500 daily players.
• The Helper:
I cannot believe that site is still going I wonder if Ryoko is involved with it at all would love to talk to him again and see what he is up to
• The Helper:
my oldest daughter failed her driving test today for her license she is 22 and yes I have been driving her everywhere her whole life
• The Helper:
Now they are blaming me on Facebook for her failure LOL I am accepting it because it is my failure I am her driving teacher even though she had certified driving instruction from the best place in town I for some reason cannot teach her how to drive this is frustrating
• jonas:
I didn't get my license until I was 25
+1
• The Helper:
Back in the old days when I was getting a license people were getting them at 16 yrs old and many were getting hardships so they could get them earlier. Almost nobody did not drive when they were able. Nowadays though....
• Ghan:
Why drive when there's Uber Eats?
+2
• The Helper:
I hope Varine is OK have not heard from him in a while.
+1
• Ghan:
Diablo 2 Resurrected launching in 9 days.
• The Helper:
Just got a new to me computer hope it will run it
• jonas:
I would buy if it had better modding support than D2, like a small lua script engine or much less hardcoded stuff