We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
rotate_x, rotate_y and rotate_z, can be simplified as rotate(vec3 & axis, const double theta) where axis is one of {1,0,0}, {0,1,0} or {0,0,1}.
rotate_x
rotate_y
rotate_z
rotate(vec3 & axis, const double theta)
{1,0,0}
{0,1,0}
{0,0,1}
The text was updated successfully, but these errors were encountered:
https://github.com/antoniogamiz/tfg/blob/acede765f17a6d3a3fe5a73add6f2ba2aaba0a59/src/include/hittable.h#L118-L119
https://github.com/antoniogamiz/tfg/blob/acede765f17a6d3a3fe5a73add6f2ba2aaba0a59/src/include/hittable.h#L141-L145
https://github.com/antoniogamiz/tfg/blob/acede765f17a6d3a3fe5a73add6f2ba2aaba0a59/src/include/hittable.h#L155-L159
All those functions could be simplified by:
void rotate(vec3& axis, point3& p, const double cos, const double sin)
Sorry, something went wrong.
axis should be declared as an enum or similar:
axis
enum Axis { x = {1,0,0}, y = {0,1,0}, z = {0,0,1}};
or maybe macros
#define XAXIS {1,0,0} ...
No branches or pull requests
rotate_x
,rotate_y
androtate_z
, can be simplified asrotate(vec3 & axis, const double theta)
where axis is one of{1,0,0}
,{0,1,0}
or{0,0,1}
.The text was updated successfully, but these errors were encountered: