MCPcopy Index your code
hub / github.com/apache/groovy / intersect

Method intersect

benchmark/bench/raytracer.java:44–49  ·  view source on GitHub ↗
(Hit i, Ray ray)

Source from the content-addressed store, hash-verified

42 return (t1 > 0 ? t1 : t2);
43 }
44 public Hit intersect(Hit i, Ray ray) {
45 double l = ray_sphere(ray);
46 if (l >= i.lambda) return i;
47 Vec n = add(ray.orig, sub(scale(l, ray.dir), center));
48 return new Hit(l, unitise(n));
49 }
50 }
51 class Group extends Scene {
52 public Sphere bound;

Callers

nothing calls this directly

Calls 5

ray_sphereMethod · 0.95
subMethod · 0.80
scaleMethod · 0.80
unitiseMethod · 0.80
addMethod · 0.65

Tested by

no test coverage detected