Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int ray_tracing_discriminant(int a, int b, int c, int r, int l, int m, int n){
- int coefficient_a = (l * l) + (m * m) + (n * n);
- int coefficient_b = -2 * ((a * l) + (b * m) + (c * n));
- int coefficient_c = (a * a) + (b * b) + (c * c) - (r * r);
- int d = (coefficient_b * coefficient_b) - (4 * coefficient_a * coefficient_c);
- return d;
- }
Add Comment
Please, Sign In to add comment