All pastes #2062758 Raw Edit

Miscellany

public c v1 · immutable
#2062758 ·published 2011-05-17 18:09 UTC
rendered paste body
int Space_collision_detection(Space space, float x, float y){	// Check all stars	List stars = space->stars;	Star star = (Star)stars->val;	while(star != NULL){		if(Star_point_within(star, x, y))			return 1;		if(!List_empty(stars->suc)){			stars = stars->suc;			star = (Star)stars->val;		} else			star = NULL;	}