We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7fb0dbd commit b4dd704Copy full SHA for b4dd704
src/blocks/motionblocks.cpp
@@ -653,8 +653,8 @@ unsigned int MotionBlocks::ifOnEdgeBounce(VirtualMachine *vm)
653
654
// Measure distance to edges
655
// Values are zero when the sprite is beyond
656
- unsigned int stageWidth = engine->stageWidth();
657
- unsigned int stageHeight = engine->stageHeight();
+ double stageWidth = engine->stageWidth();
+ double stageHeight = engine->stageHeight();
658
double distLeft = std::max(0.0, (stageWidth / 2.0) + bounds.left());
659
double distTop = std::max(0.0, (stageHeight / 2.0) - bounds.top());
660
double distRight = std::max(0.0, (stageWidth / 2.0) - bounds.right());
0 commit comments