Another little bug(fix) vector2d.h - rotateBy() + getAngle()

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
jox
Bug Slayer
Posts: 726
Joined: Thu Apr 22, 2004 6:55 pm
Location: Germany

Another little bug(fix) vector2d.h - rotateBy() + getAngle()

Post by jox »

irr0.6 vector2d.h, line75, rotateBy()

Code: Select all

	degrees *=gradPI2;
must be

Code: Select all

	degrees *=GRAD_PI2;
it only complains when that function is used.

greets,
jox
Last edited by jox on Wed May 12, 2004 3:47 pm, edited 1 time in total.
jox
Bug Slayer
Posts: 726
Joined: Thu Apr 22, 2004 6:55 pm
Location: Germany

Post by jox »

And another one, also vector2d.h. This time the getAngle() function.

irr0.6 vector2d.h , line101, getAngle()

Code: Select all

if (Y == 0.0)
	return X > 0.0 ? 90.0 : 180.0;
should look like this:

Code: Select all

if (Y == 0.0)
	return X < 0.0 ? 180.0 : 0.0;
else if (X == 0.0)
	return Y < 0.0 ? 90.0 : 270.0;
Man, this engine is great. But damn, it's full of bugs. ;)
bughunter jox
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Thanks for that correction. :)
Post Reply