glsl-util/polar.glsl

9 lines
220 B
Plaintext
Raw Normal View History

vec3 polar(float radian1, float radian2, float radius) {
return vec3(
cos(radian1) * cos(radian2) * radius,
sin(radian1) * radius,
2017-01-28 13:00:44 +08:00
cos(radian1) * sin(radian2) * radius
);
}
#pragma glslify: export(polar)