I haven't solved the issue yet, but I also just noticed something else weird with your code:
Local ProjMatrix:ProjectionMatrix = New ProjectionMatrix
This is uneccessary. There is no need to create a projectionmatrix object, because the type has only functions and global variables. So you can just access the functions like so: X = ProjectionMatrix.CenterX().
The only reason one needs to use New with a type, is if one intends to have multiple instances of said type, and if said type has some local variables with which said instances can differentiate themselves from one another, and, generally, methods to act upon said variables.
Local ProjMatrix:ProjectionMatrix = New ProjectionMatrix
This is uneccessary. There is no need to create a projectionmatrix object, because the type has only functions and global variables. So you can just access the functions like so: X = ProjectionMatrix.CenterX().
The only reason one needs to use New with a type, is if one intends to have multiple instances of said type, and if said type has some local variables with which said instances can differentiate themselves from one another, and, generally, methods to act upon said variables.