Angles from a sine
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.
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.
Re: Angles from a sine
thank you spike, finally i used a scale by the distances with the sine, because the real angle (in degrees) was too exageratedSpike 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.
hi, I am nahuel, I love quake and qc.