Guest User

Untitled

a guest
Apr 24th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. int ray_tracing_discriminant(int a, int b, int c, int r, int l, int m, int n){
  2.  
  3. int coefficient_a = (l * l) + (m * m) + (n * n);
  4. int coefficient_b = -2 * ((a * l) + (b * m) + (c * n));
  5. int coefficient_c = (a * a) + (b * b) + (c * c) - (r * r);
  6.  
  7. int d = (coefficient_b * coefficient_b) - (4 * coefficient_a * coefficient_c);
  8.  
  9. return d;
  10. }
Add Comment
Please, Sign In to add comment