collision. circleRect

the circle-rect collision object

Methods

(static) collide(circle, rectangle, sizeopt) → {boolean}

returns whether a circle and a rectangle are colliding

Parameters:
NameTypeAttributesDefaultDescription
circleObject
rectangleObject
sizenumber<optional>
circle.size

size of the circle for collisions

Returns:
Type: 
boolean

(static) physics(circle, rectangle, sizeopt) → {Object}

returns the resolution position of a circle when in collision with a rectangle

Parameters:
NameTypeAttributesDefaultDescription
circleObject
rectangleObject
sizenumber<optional>
circle.size

size of the circle for collisions

Returns:
Type: 
Object