Angles from a sine
Moderator: InsideQC Admins
3 posts
• Page 1 of 1
Angles from a sine
hello quake community! I need to know which function can give me the angle from a sine (arcsine function
) in qc. I'm using Darkplaces engine and fteqcc (maybe the engine has a function for this). thanks in advance.
hi, I am nahuel, I love quake and qc.
-

Nahuel - Posts: 492
- Joined: Wed Jan 12, 2011 8:42 pm
- Location: mar del plata
Re: Angles from a sine
quoting dpextensions.qc:
float(float s) asin = #471; // returns angle in radians for a given sin() value, the result is in the range -PI*0.5 to PI*0.5
you'll need to rescale it to degrees if you want to use it for an entity angle.
float(float s) asin = #471; // returns angle in radians for a given sin() value, the result is in the range -PI*0.5 to PI*0.5
you'll need to rescale it to degrees if you want to use it for an entity angle.
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
Re: Angles from a sine
Spike wrote:quoting dpextensions.qc:
float(float s) asin = #471; // returns angle in radians for a given sin() value, the result is in the range -PI*0.5 to PI*0.5
you'll need to rescale it to degrees if you want to use it for an entity angle.
thank you spike, finally i used a scale by the distances with the sine, because the real angle (in degrees) was too exagerated
hi, I am nahuel, I love quake and qc.
-

Nahuel - Posts: 492
- Joined: Wed Jan 12, 2011 8:42 pm
- Location: mar del plata
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest