Click here to Skip to main content
15,887,683 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Filling a cylinder or a tube Pin
Andy_L_J25-Mar-10 19:50
Andy_L_J25-Mar-10 19:50 
GeneralRe: Filling a cylinder or a tube Pin
Moreno Airoldi25-Mar-10 22:27
Moreno Airoldi25-Mar-10 22:27 
QuestionFirewall Bypass via Compression Encoding Pin
Khalib Ismail19-Mar-10 16:05
Khalib Ismail19-Mar-10 16:05 
AnswerRe: Firewall Bypass via Compression Encoding Pin
Michel Godfroid1-Apr-10 6:12
Michel Godfroid1-Apr-10 6:12 
Question2D collision detection between a square and rectangle [modified] Pin
venomation8-Mar-10 13:10
venomation8-Mar-10 13:10 
AnswerRe: 2D collision detection between a square and rectangle Pin
Luc Pattyn8-Mar-10 13:42
sitebuilderLuc Pattyn8-Mar-10 13:42 
GeneralRe: 2D collision detection between a square and rectangle Pin
venomation8-Mar-10 13:53
venomation8-Mar-10 13:53 
GeneralRe: 2D collision detection between a square and rectangle Pin
venomation8-Mar-10 14:49
venomation8-Mar-10 14:49 
I figured out a solution my self, wasn't as tricky as I had thought, being 2am didn't help though:

public bool HitTest(Sprite paddle)
{
    bool left = _ball.Position.X + _ball.Width > paddle.Position.X;
    bool right = _ball.Position.X < paddle.Position.X + paddle.Width;
    bool up =  _ball.Position.Y + _ball.Height > paddle.Position.Y;
    bool down = _ball.Position.Y < paddle.Position.Y + paddle.Height;

    return (left && right && up && down);
}

QuestionDesigning Parallel Algorithms Pin
ProtoBytes2-Mar-10 7:43
ProtoBytes2-Mar-10 7:43 
AnswerRe: Designing Parallel Algorithms Pin
Chris Losinger5-Mar-10 8:51
professionalChris Losinger5-Mar-10 8:51 
AnswerRe: Designing Parallel Algorithms [Modified - Spell Checked] [modified] Pin
ProtoBytes5-Mar-10 11:57
ProtoBytes5-Mar-10 11:57 
GeneralRe: Designing Parallel Algorithms [Modified - Spell Checked] Pin
Chris Losinger8-Mar-10 4:27
professionalChris Losinger8-Mar-10 4:27 
AnswerRe: Designing Parallel Algorithms Pin
Fatbuddha 119-Mar-10 2:24
Fatbuddha 119-Mar-10 2:24 
QuestionClosest Polygon Pin
Richard Andrew x6418-Feb-10 17:36
professionalRichard Andrew x6418-Feb-10 17:36 
AnswerRe: Closest Polygon Pin
Som Shekhar18-Feb-10 19:00
Som Shekhar18-Feb-10 19:00 
GeneralRe: Closest Polygon Pin
Richard Andrew x6419-Feb-10 6:10
professionalRichard Andrew x6419-Feb-10 6:10 
AnswerRe: Closest Polygon Pin
Luc Pattyn18-Feb-10 21:29
sitebuilderLuc Pattyn18-Feb-10 21:29 
GeneralRe: Closest Polygon Pin
Richard Andrew x6419-Feb-10 6:11
professionalRichard Andrew x6419-Feb-10 6:11 
AnswerRe: Closest Polygon Pin
ProtoBytes19-Feb-10 4:45
ProtoBytes19-Feb-10 4:45 
GeneralRepost Pin
Luc Pattyn19-Feb-10 4:58
sitebuilderLuc Pattyn19-Feb-10 4:58 
GeneralRe: Closest Polygon Pin
Richard Andrew x6419-Feb-10 6:12
professionalRichard Andrew x6419-Feb-10 6:12 
AnswerRe: Closest Polygon [modified] Pin
harold aptroot19-Feb-10 6:47
harold aptroot19-Feb-10 6:47 
GeneralRe: Closest Polygon Pin
Richard Andrew x6419-Feb-10 6:55
professionalRichard Andrew x6419-Feb-10 6:55 
GeneralRe: Closest Polygon Pin
harold aptroot19-Feb-10 7:05
harold aptroot19-Feb-10 7:05 
GeneralRe: Closest Polygon Pin
Richard Andrew x6419-Feb-10 7:07
professionalRichard Andrew x6419-Feb-10 7:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.