[mu͒3] the Math object
I’ve built a plugin and gave it to someone to test which uses Math.trunc()
. They report that it got terminated with:
file:///home/…/export-location-info-phys.qml:494: TypeError: Property 'trunc' of object [object Math] is not a function
This worked for me though, so… why?
Comments
Which Qt versions? They differ in the level of ECMA support
In reply to Which Qt versions? by Jojo-Schmitz
Apparently, the MuseScore 3 Portable AppImage, on Ubuntu focal IIUC in case that matters. (It also complains on
cmd("unroll-repeats");
if there are no repeats in the score, is that new (as in post-3.2.3)?)On my side, where it works, I have Qt 5.15.
In reply to Apparently, the MuseScore 3… by mirabilos
The portable apps come with Qt 5.9, lower level of ECMA script than 5.15
And yes, IIRC unroll loops cane after 3.2.3
In reply to The portable apps come with… by Jojo-Schmitz
OK @ Qt.
My 3.2.3 does unroll loops just fine, it’s the newer ones which don’t…
Not a direct answer to your question and to be refined for negative numbers, but you can try round(x - .5)
In reply to Not a direct answer to your… by frfancha
This is… scary but probably correct, I can use that as workaround for now. Thanks.