Skip to content

Files

Latest commit

39a611c · Jul 30, 2020

History

History
This branch is 67 commits behind patriciogonzalezvivo/thebookofshaders:master.

length

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jul 30, 2020
Aug 23, 2017

Length

Calculate the length of a vector

Declaration

float length(float x)  
float length(vec2 x)  
float length(vec3 x)  
float length(vec4 x)

Parameters

x specifies a vector of which to calculate the length.

Description

length() returns the length of the vector.

See Also

distance(), normalize(), Chapter 07: Shapes