Re: How can I determine if a point is a given distance from a second point?
- From: "Tom P." <padilla.henry@xxxxxxxxx>
- Date: Mon, 31 Mar 2008 12:29:43 -0700 (PDT)
On Mar 31, 1:58 pm, thomasnguyencom <thomasnguyen...@xxxxxxxxx> wrote:
On Mar 31, 1:24 pm, "Tom P." <padilla.he...@xxxxxxxxx> wrote:
I am writing a drawing program but I want to keep the scale down
(there could end up being several hundred objects on the screen).
I want to limit the points collected to a certain distance from other
points already collected, in other words, if you're drawing a line it
will only record points on the line every 6 pixels. How do I determine
how far away one point is from another? if they are restricted to
straight lines that's fine but as soon as they draw at an angle I'm
faced with determining how far away one point is from another in co-
ordinate space.
Any help would be appreciated.
Tom P.
Point x = new Point(1, 2);
Point y = new Point(3, 4);
double distance = Point.Distance(x, y);
I hope that helps.
goodluck,
-tom
On second thought... no it doesn't help.
I'm not finding that static method. Am I missing a namespace or
something?
Tom P.
.
- References:
- Prev by Date: Re: How can I determine if a point is a given distance from a second point?
- Next by Date: Re: How can I determine if a point is a given distance from a second point?
- Previous by thread: Re: How can I determine if a point is a given distance from a second point?
- Next by thread: Re: How can I determine if a point is a given distance from a second point?
- Index(es):
Relevant Pages
|