OpenXcom Forum
Contributions => Programming => Topic started by: sir_nacnud on September 29, 2010, 03:04:50 am
-
MovingTarget.cpp needed cmath included for sqrt(). Attached patch fixes this.
I noticed you had defined PI yourself in a couple of places in the code. There is a define for PI in cmath, called M_PI. Just a heads up in case you didn't know about it.
-
M_PI is not standard and I don't think it's included in VC++.
-
Fixed, apparently I needed to add:
#define _USE_MATH_DEFINES
So I just replaced one define with another, but consistency and all that. :P
-
Why not make _USE_MATH_DEFINES a compiler define so you don't have to define it each time you want to use M_PI?