In my CPP file I have a call that is:
pt.x = mDownPoint.x + FSign(pt.x-mDownPoint.x) *
FMax( FAbs(pt.x-mDownPoint.x), FAbs(pt.y-mDownPoint.y) );
I get compiler errors for FSign
, FMax
, FAbs
, but I include the header file where they are at.
So I don't see why it would not find it, unless I have done something wrong in the creation of this header file.
Can I get some pointers on what I am doing wrong?
Header:
class FxMathFunctions
{
struct FxPoint2d;
public:
FxMathFunctions();
~FxMathFunctions();
static FxInt32 IMin(FxInt32 i1,FxInt32 i2);
static FxInt32 IMax(FxInt32 i1,FxInt32 i2);
static FxInt32 ILimit(FxInt32 val, FxInt32 i1, FxInt32 i2);
static FxDouble FMin(FxDouble i1,FxDouble i2);
static FxDouble FMax(FxDouble i1,FxDouble i2);
static FxFloat FMax(FxFloat i1,FxFloat i2);
static FxFloat FLimit(FxFloat val, FxFloat i1, FxFloat i2);
static FxDouble FrInverseContrast(FxDouble opacity,FxDouble antialias);
static FxInt32 ISign(FxInt32 l);
static FxFloat FSign(FxFloat v);
static FxInt32 IAbs(FxInt32 l);
static FxFloat FAbs(FxFloat v);
static FxInt32 INonzero(FxInt32 l);
static double DAbs(double v);
static FxInt32 Sqr(FxByte v);
static FxInt32 Sqr(FxInt32 v);
static FxFloat Sqr(FxFloat v);
static FxDouble Sqr(FxDouble v);
static FxInt32 FrCubed(FxByte v);
static FxInt32 FrCubed(FxInt32 v);
static FxFloat FrCubed(FxFloat v);
static FxDouble FrCubed(FxDouble v);
static FxDouble FrFourthPower(FxDouble v);
static FxFloat FrFourthPower(FxFloat v);
static FxBool FNearEqual(FxFloat val, FxFloat nearTo, FxFloat closeness = 0.00001f);
static FxBool FNearGreaterEqual(FxFloat val, FxFloat nearTo, FxFloat closeness = 0.00001f);
static FxBool FNearLessEqual(FxFloat val, FxFloat nearTo, FxFloat closeness = 0.00001f);
};
.CPP to Header where applicable for one function that is failing:
FxFloat FAbs(FxFloat v)
{
if (v < 0.0f) v = -v;
return v;
}
EDIT:
Fixed call:
pt.x = mDownPoint.x + FxMathFunctions::FSign(pt.x-mDownPoint.x) *
FxMathFunctions::FMax( FxMathFunctions::FAbs(pt.x-mDownPoint.x),
FxMathFunctions::FAbs(pt.y-mDownPoint.y) );
Failing with:
error: cannot call member function 'FxFloat FxMathFunctions::FAbs(FxFloat)'