BABYLON.Epsilon is too big and readonly

So recently I have been testing new babylon version 4.0.0 Beta-3 and I encountered a problem where my current project stopped working. I’m working with really small and precise numbers so I have been changeing BABYLON.Epsilon. But in new version Epsilon is readonly and I can’t change it, is there any other way?

https://www.babylonjs-playground.com/#MFKB9Z

My personal opinion is that Epsilon, what is a fixed value, is just a tool usable in only certain circumstances.
Indeed, if you’re dealing with very little values, Epsilon could be too big for you.
I remember that a physician prof in my distant higher education studies used to teach us that something (a value) could be considered as negligible when it was 1/1000 tinier or less than all the other values around.
Applying this kind of rule, you could consider that your custom Epsilon computation would be something like :
var deltaRatio = Math.abs( (val1 - val2) / val1);
// val1 != 0, of course, else use val2 instead
if (deltaRatio < 0.001) { //do stuff }

This should work whatever the scale of your used values

I understand the rule, the problem I have is that in new version variable BABYLON.Epsilon is readonly.

You are right. I’ll remove the const constraint for next commit :slight_smile:

Thank you