Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #18627
| From | Gregor Kofler <usenet@gregorkofler.com> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: How does the algoritm look like in this scenario |
| Date | 2013-02-25 18:36 +0100 |
| Organization | A noiseless patient Spider |
| Message-ID | <kgg7d9$fkl$1@dont-email.me> (permalink) |
| References | <kgfgj7$d9b$1@dont-email.me> |
Am 2013-02-25 12:07, schrieb Tony: > Hello! > > Assume I have on the x-axes the display area from x=40 pixels to x=750 > pixels > If I now want to set a lot of point in this coordinate system. > For example if I have x-value 0 this would be positioned at x = 40 and > x-value 800 would be positioned at x=750. > So I have to transform my x value into the coordinate system where origo > for x is 40 and x max is 800. > > I can't find a suitable algoritm that can transform my x values into > this coordinate system. > > //Tony xNew = xOld * (750 - 40) / 800 + 40; Are we doing your homework, or have you been perpetually asleep in the basic math lessons? Or... are you just trolling?
Back to comp.lang.javascript | Previous | Next — Previous in thread | Find similar | Unroll thread
How does the algoritm look like in this scenario "Tony" <tony.johansson@inport.com> - 2013-02-25 12:07 +0100 Re: How does the algoritm look like in this scenario Martin Leese <please@see.Web.for.e-mail.INVALID> - 2013-02-25 10:36 -0700 Re: How does the algoritm look like in this scenario Gregor Kofler <usenet@gregorkofler.com> - 2013-02-25 18:36 +0100
csiph-web