Skip to content

Commit b4dd704

Browse files
committed
Fix unsigned int conversion in "if on edge, bounce" block
1 parent 7fb0dbd commit b4dd704

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/blocks/motionblocks.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -653,8 +653,8 @@ unsigned int MotionBlocks::ifOnEdgeBounce(VirtualMachine *vm)
653653

654654
// Measure distance to edges
655655
// Values are zero when the sprite is beyond
656-
unsigned int stageWidth = engine->stageWidth();
657-
unsigned int stageHeight = engine->stageHeight();
656+
double stageWidth = engine->stageWidth();
657+
double stageHeight = engine->stageHeight();
658658
double distLeft = std::max(0.0, (stageWidth / 2.0) + bounds.left());
659659
double distTop = std::max(0.0, (stageHeight / 2.0) - bounds.top());
660660
double distRight = std::max(0.0, (stageWidth / 2.0) - bounds.right());

0 commit comments

Comments
 (0)