raytracing.github.io icon indicating copy to clipboard operation
raytracing.github.io copied to clipboard

Unused variable p in main.cc

Open lawless-m opened this issue 10 years ago • 4 comments

p is never used in main.cc

89: vec3 p = r.point_at_parameter(2.0); 90: col += color(r, world,0);

should the r in 90: be p ?

lawless-m avatar Aug 19 '16 01:08 lawless-m

ugh, I should have tried it, wrong type. But still, p doesn't seem to do anything.

Point_at_parameter has no side effects

lawless-m avatar Aug 19 '16 01:08 lawless-m

I ended up just removing the line when working through the book. It does not appear to serve a purpose.

justuswilhelm avatar Oct 14 '16 16:10 justuswilhelm

Good eye. That looks like dead code.

Pete

On Fri, Oct 14, 2016 at 10:43 AM, Justus Perlwitz [email protected] wrote:

I ended up just removing the line when working through the book. It does not appear to serve a purpose.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/petershirley/raytracinginoneweekend/issues/1#issuecomment-253855181, or mute the thread https://github.com/notifications/unsubscribe-auth/ACq6ioI6mv-Imm_aESyfjaQN90sDWVKBks5qz7EzgaJpZM4JoEDP .

petershirley avatar Oct 14 '16 19:10 petershirley

It seems that p is the point that the ray intersecting with the film plane? (not the focal plane)

LYP951018 avatar Dec 23 '17 07:12 LYP951018