Skip to content

Commit

Permalink
Converted 0 to 0.0 in sdf() and angle_between_vectors()
Browse files Browse the repository at this point in the history
  • Loading branch information
samipism committed Feb 3, 2021
1 parent 3938f81 commit 5a16e3a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion manimlib/shaders/quadratic_bezier_fill/frag.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ float sdf(){
float sgn = orientation * sign(v2);
float Fp = (p.x * p.x - p.y);
if(sgn * Fp < 0){
return 0;
return 0.0;
}else{
return min_dist_to_curve(uv_coords, uv_b2, bezier_degree);
}
Expand Down
2 changes: 1 addition & 1 deletion manimlib/shaders/quadratic_bezier_stroke/geom.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void flatten_points(in vec3[3] points, out vec2[3] flat_points){
float angle_between_vectors(vec2 v1, vec2 v2){
float v1_norm = length(v1);
float v2_norm = length(v2);
if(v1_norm == 0 || v2_norm == 0) return 0;
if(v1_norm == 0 || v2_norm == 0) return 0.0;
float dp = dot(v1, v2) / (v1_norm * v2_norm);
float angle = acos(clamp(dp, -1.0, 1.0));
float sn = sign(cross2d(v1, v2));
Expand Down

0 comments on commit 5a16e3a

Please sign in to comment.