Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. public Volume2D a(Volume2D v, double paramDouble) {
  2. double d1 = v.X - X;
  3. double d2 = v.Y - Y;
  4. double d3 = v.Z - Z;
  5.  
  6. if (d1*d1 < 1)
  7. return null;
  8.  
  9. double d4 = (paramDouble - X) / d1;
  10.  
  11. if ((d4 < 0.0D) || (d4 > 1.0D))
  12. return null;
  13.  
  14. return get(X + d1*d4, Y + d2*d4, Z + d3*d4);
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement