Advertisement
Aslai

Untitled

Mar 28th, 2012
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.39 KB | None | 0 0
  1.     double Map::block::get_delta( double x, double y, double bx, double by ){
  2.         if( slope == 0 ){
  3.             if( y >= by && up )
  4.                 return by - y;
  5.             return 0;
  6.         }
  7.         double t =  ( x - bx ) / slope + by + ( slope < 0 ? Global.Block.Size : 0 ) + Global.Block.Size / slope  * segnum;
  8.         if( y >= t )
  9.             return t - y;
  10.         return 0;
  11.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement