glsl-hypot
The 2D hypot function for GLSL
Introduction
sqrt(x * x + y * y)
is easy, but it's subject to overflow. This function returns the length of a vec2 while avoiding overflow/underflow. Most of the time, you're almost certainly fine without this.
Usage
# hypot = require(glsl-hypot)attribute vec3 position;void
License
© 2016 Ricky Reusser. MIT License.