ID:2818385
 
Resolved
Dividing a matrix by a numerical constant at compile time compiled the result incorrectly as the number 0.
BYOND Version:514
Operating System:Linux
Web Browser:Chrome 104.0.0.0
Applies to:Dream Maker
Status: Resolved (514.1587)

This issue has been resolved.
Descriptive Problem Summary:
Matrix math is a little scuffed in 514.1584 (Tested on linux as thats what my compile bot uses)

Two mathemtical operations that should do the exact same, produce different results.

Code Snippet (if applicable) to Reproduce Problem:
#define VAR_OUT(A) world.log << "[#A] => [json_encode(A)]"

var/matrix/M1 = matrix() / 2
var/matrix/M2 = matrix() * 0.5

VAR_OUT(M1)
VAR_OUT(M2)


Expected Results:

Both matricies to be the same

Actual Results:

M1 => 0
M2 => [0.5,0,0,0,0.5,0]

Does the problem occur:
Every time? Or how often? Every time
In other games? Yes, base with DM lang
In other user accounts? No idea
On other computers? No idea

When does the problem NOT occur?

No idea

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)

Will verify if others ask

Workarounds:

Multiply it by the inverse
Man, I wish this had been posted sooner. It missed out on being included in the maintenance release.
Lummox JR resolved issue with message:
Dividing a matrix by a numerical constant at compile time compiled the result incorrectly as the number 0.