float SweepCircleToLine(struct Vec2 *pCtr, float radius, struct Vec2 *pVel, struct Vec2 *pPnt, struct Vec2 *pDirection)
{
Vec2 normal;
normal.x = pDirection->y;
normal.y = -pDirection->x;
Vec2Normalize(&normal, &normal);
float dot = Vec2DotProduct(&normal, pPnt) - radius;
float time = 0.0f;
time = dot - Vec2DotProduct(&normal, pCtr);
time = time / Vec2DotProduct(&normal, pVel);
return time;
}
Subscribe to:
Post Comments (Atom)
2 comments:
Homework.
Not talkative tonight.
Better luck tomorrow?
I'm a little worried about you. The "tone" of you las couple of entries has been very sad. Here's a virtual hug XXXX
Love,
Mom
Post a Comment