Spaces:
Runtime error
Runtime error
s4s-editor-beta
/
local-scratch-vm
/test
/snapshot
/__snapshots__
/tw-coordinate-precision.sb3.tw-snapshot
// TW Snapshot | |
// Input SHA-256: b1e62179f7a495c46c7e9c64a03d405924f6011b66aa71f6ec0f1781b936d38c | |
// Sprite1 script | |
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); | |
const b0 = runtime.getOpcodeFunction("looks_say"); | |
const b1 = runtime.getSpriteTargetByName("Sprite1"); | |
return function* genXYZ () { | |
yield* executeInCompatibilityLayer({"MESSAGE":"plan 6",}, b0, false, false, null); | |
target.setXY(1e-9, target.y); | |
if ((limitPrecision(target.x) === 1e-9)) { | |
yield* executeInCompatibilityLayer({"MESSAGE":"pass much above x does not round",}, b0, false, false, null); | |
} | |
if (((b1 ? b1.x : 0) === 1e-9)) { | |
yield* executeInCompatibilityLayer({"MESSAGE":"pass initial 'of' test",}, b0, false, false, null); | |
} | |
target.setXY(target.x + 0, target.y); | |
runtime.ext_scratch3_motion._moveSteps(0, target); | |
target.setXY(target.x + -9e-10, target.y); | |
if (((b1 ? b1.x : 0) === 1.0000000000000007e-10)) { | |
yield* executeInCompatibilityLayer({"MESSAGE":"pass 'of' never rounds - positive x",}, b0, false, false, null); | |
} | |
if ((limitPrecision(target.x) === 0)) { | |
yield* executeInCompatibilityLayer({"MESSAGE":"pass x slightly above 0 rounds",}, b0, false, false, null); | |
} | |
target.setXY(target.x + -9e-10, target.y); | |
target.setXY(target.x, target.y + 0); | |
if (((b1 ? b1.x : 0) === -7.999999999999999e-10)) { | |
yield* executeInCompatibilityLayer({"MESSAGE":"pass 'of' never rounds and change x - negative x",}, b0, false, false, null); | |
} | |
if ((limitPrecision(target.x) === 0)) { | |
yield* executeInCompatibilityLayer({"MESSAGE":"pass x slightly below 0 rounds",}, b0, false, false, null); | |
} | |
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, null); | |
retire(); | |
}; }) | |