Lower threshold for dot was (1.0 - threshold) which is incorrect. Patch changes it to correct version sqrt(1.0 - threshold * threshold) Co-authored-by: Ricardo Buring <ricardo.buring@gmail.com>