Change drag operations from array to vector, also use vectorfunctions and gobal variables.
Details
Details
test some drag operations like bandbox or house rotation
Diff Detail
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
binaries/data/mods/public/gui/session/input.js | ||
---|---|---|
681 ↗ | (On Diff #5723) | abs unneeded. Same for the rest. |
Comment Actions
Successful build - Chance fights ever on the side of the prudent.
Updating workspaces... Build (release)... Build (debug)... Running release tests... Running cxxtest tests (309 tests).....................................................................................................................................................................................................................................................................................................................OK! Running debug tests... Running cxxtest tests (309 tests).....................................................................................................................................................................................................................................................................................................................OK! Checking XML files...
binaries/data/mods/public/gui/session/input.js | ||
---|---|---|
550 ↗ | (On Diff #5731) | inline dragDelta? |
binaries/data/mods/public/gui/session/input.js | ||
---|---|---|
371 ↗ | (On Diff #5732) | Is that Vector2D.max(g_DragStart, ev) ? |
binaries/data/mods/public/gui/session/input.js | ||
---|---|---|
371 ↗ | (On Diff #5732) | nearly. v0 = Vector2D.min(g_DragStart, ev); v1 = Vector2D.max(g_DragStart, ev); |
binaries/data/mods/public/gui/session/input.js | ||
---|---|---|
371 ↗ | (On Diff #5732) | Can someone fix it? 2 lines seem considerably easier than 16 (I wouldn't be surprised if it's even faster, though the performance is negligible I expect) |