[Flashcoders] Math help

2010-09-10 Thread Lehr, Theodore
So if I have to line segments: A: 0-799 B: 66.92 - 124.40 Given a point on B (80.6 for example) how can I find the equivalent point on A? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com

RE: [Flashcoders] Math help

2010-09-10 Thread Merrill, Jason
...@chattyfig.figleaf.com] On Behalf Of Lehr, Theodore Sent: Friday, September 10, 2010 7:24 AM To: Flash Coders List Subject: [Flashcoders] Math help So if I have to line segments: A: 0-799 B: 66.92 - 124.40 Given a point on B (80.6 for example) how can I find the equivalent point

Re: [Flashcoders] Math help

2010-09-10 Thread John McCormack
length of B: 124.40 - 66.90 = 57.5 length traversed along B: 80.6 - 66.92 = 13.68 proportion of B traversed: 13.68/57.5 = 0.237913043 length of A = 799 - 0 = 799 proportion of A traversed: 0.237913043 length traversed along A: 0.237913043 * 799 = 190.0925217 If your screen width is 800 pixels

Re: [Flashcoders] Math help

2010-09-10 Thread John McCormack
Correction: In some cases you might want to round it up with int(0 +190.0925217 + 0.5) - 191 John On 10/09/2010 13:21, John McCormack wrote: length of B: 124.40 - 66.90 = 57.5 length traversed along B: 80.6 - 66.92 = 13.68 proportion of B traversed: 13.68/57.5 = 0.237913043 length of A =

Re: [Flashcoders] Math help

2010-09-10 Thread John McCormack
Further correction: In some cases you might want to round it up with int(0 +190.0925217 + 0.5) = int (190.5925217) = 190 Phew! J On 10/09/2010 13:21, John McCormack wrote: length of B: 124.40 - 66.90 = 57.5 length traversed along B: 80.6 - 66.92 = 13.68 proportion of B traversed:

RE: [Flashcoders] Math help

2010-09-10 Thread Lehr, Theodore
...@bankofamerica.com] Sent: Friday, September 10, 2010 7:58 AM To: Flash Coders List Subject: RE: [Flashcoders] Math help I assume you mean those numbers represent X values, and I assume by equivalent you mean the same percentage along the line (since those lines are of two different lengths). Then all you have

RE: [Flashcoders] Math help

2010-09-10 Thread Steve Abaffy
: [Flashcoders] Math help Hhmmm I do not think this is working - here is my issue - maybe someone has an idea. I have a mc that is basically a map of the US. I am getting the long and lat of a location I want to be able to put a point on the map based on that long and lat - my thought was that I

RE: [Flashcoders] Math help

2010-09-10 Thread Merrill, Jason
: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Lehr, Theodore Sent: Friday, September 10, 2010 11:37 AM To: Flash Coders List Subject: RE: [Flashcoders] Math help Hhmmm I do not think this is working - here is my issue - maybe someone has

RE: [Flashcoders] Math help

2010-09-10 Thread Lehr, Theodore
it From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Merrill, Jason [jason.merr...@bankofamerica.com] Sent: Friday, September 10, 2010 12:08 PM To: Flash Coders List Subject: RE: [Flashcoders] Math help

RE: [Flashcoders] Math help

2010-09-10 Thread Merrill, Jason
of America associates) -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Lehr, Theodore Sent: Friday, September 10, 2010 12:13 PM To: Flash Coders List Subject: RE: [Flashcoders] Math help Hhmmm that makes sense