Curious about duplicate functions. #282
Replies: 1 comment 2 replies
-
The two different "matrix element setter" methods are primarily used in the Other classes, like the mentioned
Indeed, that was the plan at some point and it might be reconsidered when there are actually two different feasible matrix/vector implementations when Panama's Vector API is stable and fast. With that being said, please note that using the element setter methods or setting the element fields directly is really bad practice when using JOML (at least when it comes to the |
Beta Was this translation helpful? Give feedback.
-
I've been a big fan of LWJGL and I have recently been exploring JOML.
I'm curious why all the matrix classes have a public and a private functions for the same thing. Is there some kind of performance benefit to this somewhere I am not seeing?
e.g.:
JOML/src/org/joml/Matrix2f.java
Lines 165 to 168 in 7fd5da7
JOML/src/org/joml/Matrix2f.java
Lines 210 to 213 in 7fd5da7
Also, why have class fields and getters both be set as public, is it just for convenience? Have abstract classes been considered to replace the interfaces to unify these, or is there some kind of performance penalty?
Thank you for your time!
Beta Was this translation helpful? Give feedback.
All reactions