pull/395/merge
byeval 3 months ago committed by GitHub
commit c495cacdf7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -14,13 +14,13 @@ uniform float u_time;
void main(){
vec2 st = gl_FragCoord.xy/u_resolution.xy;
st.x *= u_resolution.x/u_resolution.y;
vec3 color = vec3(0.0);
float d = 0.0;
// Remap the space to -1. to 1.
st = st *2.-1.;
st.x *= u_resolution.x/u_resolution.y;
// Number of sides of your shape
int N = 3;

@ -24,7 +24,7 @@ vec4 atan(vec4 y_over_x)
### Description
```atan()``` returns the angle whose trigonometric arctangent is ```y,x``` or ```y_over_x```, depending on which overload is invoked. In the first overload, the signs of ```y``` and ```x``` are used to determine the quadrant that the angle lies in. The values returned by atan in this case are in the range -PI and PI. Results are undefined if ```x``` is zero.
For the second overload, ```atan()``` returns the angle whose tangent is ```y_over_x```. Values returned in this case are in the range -PI to PI.
For the second overload, ```atan()``` returns the angle whose tangent is ```y_over_x```. Values returned in this case are in the range -PI/2 to PI/2.
### See Also
[cos](/glossary/?search=cos), [acos](/glossary/?search=acos), [sin](/glossary/?search=sin), [asin](/glossary/?search=asin), [atan](/glossary/?search=atan), [Chapter 05: Shaping Functions](/05/), [Chapter 06: Color](/06/)

Loading…
Cancel
Save