mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 05:07:00 -04:00
Eliminated most build errors (gcc,linux,wxGTK).
What is left is mostly:
- warning: converting double to int
-> add a cast/to_int or ignore
- wrong initialization order in ctor
-> just swap the order to match the class
- errors about wxCursors
-> add a function loadResourceCursor
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@183 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -18,7 +18,7 @@ inline double sgn(double v) { return v > 0 ? 1 : -1; }
|
||||
|
||||
Vector2D constrainVector(const Vector2D& v, bool constrain, bool onlyDiagonal) {
|
||||
if (!constrain) return v;
|
||||
double ax = abs(v.x), ay = abs(v.y);
|
||||
double ax = fabs(v.x), ay = fabs(v.y);
|
||||
if (ax * 2 < ay && !onlyDiagonal) {
|
||||
return Vector2D(0, v.y); // vertical
|
||||
} else if(ay * 2 < ax && !onlyDiagonal) {
|
||||
|
||||
Reference in New Issue
Block a user