Replaces the components of a p5.Vector that are very close to zero with zero.
In computers, handling numbers with decimals can give slightly imprecise answers due to the way those numbers are represented. This can make it hard to check if a number is zero, as it may be close but not exactly zero. This method rounds very close numbers to zero to make those checks easier
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/EPSILON
Examples
Syntax
clampToZero()
Parameters
Returns
Related References
textToContours
Returns an array of arrays of points outlining a string of text written using the font.
textToModel
Converts text into a 3D model that can be rendered in WebGL mode.
textToPaths
Returns a flat array of path commands that describe the outlines of a string of text.
textToPoints
Returns an array of points outlining a string of text written using the font.