Ref: Calculate Angle

Ref: Collision Detection

Ref Book: Game Physics Engine Development