Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<< and >> operators overloaded but never used #156

Closed
ghost opened this issue Aug 28, 2019 · 3 comments
Closed

<< and >> operators overloaded but never used #156

ghost opened this issue Aug 28, 2019 · 3 comments

Comments

@ghost
Copy link

ghost commented Aug 28, 2019

In vec3.h file, the the << and >> are overloaded for take vector element from standard input, and to print it, but never used in anywhere. I'm not sure it's a problem but it simply isn't necessary.

@hollasch
Copy link
Collaborator

Ooh, that's a good point. The current code conflates vectors and colors, and in main.cc does the same operations to print out the pixel color (with an additional newline).

I think the operator<< is the way to go, but your point stands either way — we need to do one or the other.

@hollasch hollasch transferred this issue from RayTracing/InOneWeekend Aug 30, 2019
@hollasch hollasch added this to the post-v2 milestone Aug 30, 2019
@ronaldfw ronaldfw self-assigned this Sep 24, 2019
@hollasch
Copy link
Collaborator

vec3::operator<< is used in theNextWeek/constant_medium.h.

hollasch added a commit that referenced this issue Oct 21, 2019
Resolves #153
Resolves #156
Resolves #215
@hollasch hollasch mentioned this issue Oct 21, 2019
hollasch added a commit that referenced this issue Oct 21, 2019
Resolves #153
Resolves #156
Resolves #215
@hollasch
Copy link
Collaborator

Resolved in #226, changes in development branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants