Planar logo

Previous topic

Polygon Objects

Next topic

planar.Vec2 – 2D Vectors

This Page

planar – Global Definitions


Package version as a tuple of three integers: (major_version, minor_version, bugfix_version).


Package version as a string: "major_version.minor_version.bugfix_version".


Allowed absolute error value for approximate floating point comparison operations.


Squared absolute error value, always EPSILON**2.


Set the global absolute error value and rounding limit for approximate floating point comparison operations. This value is accessible via the planar.EPSILON global variable.

The default value of 0.00001 is suitable for values that are in the “countable range”. You may need a larger epsilon when using large absolute values, and a smaller value for very small values close to zero. Otherwise approximate comparison operations will not behave as expected.


You should only change the EPSILON value via the set_epsilon() function. Assigning a value to the variable directly will not work correctly, and may result in undefined behavior.