change 0 to 0.0 in quadratic_bezier_stroke/geom.glsl

This commit is contained in:
鹤翔万里 2021-02-01 22:55:40 +08:00 committed by GitHub
parent fe85d4e02f
commit 5cc30df2ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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));
@ -269,4 +269,4 @@ void main() {
EmitVertex();
}
EndPrimitive();
}
}