Module: wk/math/collision/collisionCircleCircle

Methods


<static> collisionCircleCircle(p_c1, p_c2)

Computes whether two circles collide or not. If they collide, they are pulled apart and the speed is modified taking into account the principles of conservation of momentum and of conversation of energy.
Parameters:
Name Type Description
p_c1 ModelCircle
p_c2 ModelCircle
Source:
Returns:
Type
Boolean

Type Definitions


ModelCircle

Type:
  • Object
Properties:
Name Type Description
r number radius
m number mass
x number x position
y number y position
vx number x velocity
vy number y velocity
Source: