mirror of
https://github.com/patriciogonzalezvivo/thebookofshaders
synced 2024-11-01 21:40:27 +00:00
612 B
612 B
Distance
Calculate the distance between two points
Declaration
float distance(float p0, float p1)
float distance(vec2 p0, vec2 p1)
float distance(vec3 p0, vec3 p1)
float distance(vec4 p0, vec4 p1)
Parameters
p0
specifies the first of two points
p1
specifies the second of two points
Description
distance()
returns the distance between the two points p0
and p1
.