Collision handling for rectangles.
File: 
AWRCollision.lib 
Version: 
1.0 
Author: 
Marcus Johansson 
This library lets you move a rectangle around in a world of rectangles with collision detection.
Name 
Parameters 
Brief description 

function 
&r[], dx, dy, &rects[][] 
Move rectangle. 

function 
&r#[], dx#, dy#, &rects#[][] 
Move rectangle. 
function AWR_MoveRect[] ( &r[], dx, dy, &rects[][] )'r' is a rectangle [x, y, w, h] (top left corner, width and height) moving with the speed '(dx dy)'. 'rects' is an array of rectangles, [0..n][x, y, w, h] that prevents 'r' from moving. The function returns an array, [left, right, up, down] that tells you if there's been a collision in a certain direction. The position of 'r' is automaticly adjusted during collision.
Return value [ Back ] 
function AWR_MoveRectF#[] ( &r#[], dx#, dy#, &rects#[][] )This function works like 'AWR_MoveRect' but uses floating point coordinates.
Return value [ Back ] 
Generated with NLDoc 20140630.