Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #37580
| Newsgroups | comp.lang.javascript |
|---|---|
| Subject | Re: Weather App - one more round? |
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
| References | <be7fd1b4-ac6c-4897-930e-998d5ce4daf2@googlegroups.com> <406e6538-430e-4a3e-ad1f-bd2dd81aa873@googlegroups.com> <abc5921f-655c-4378-84ad-f639b8fc0681@googlegroups.com> <fff1fff6-e24d-4ef5-8273-edff1ea14e00@googlegroups.com> |
| Date | 2019-10-18 13:23 +0200 |
| Message-ID | <XnsAAEC88345AB3Deejj99@194.109.6.166> (permalink) |
luserdroog <luser.droog@gmail.com> wrote on 18 Oct 2019 in
comp.lang.javascript:
> compassPoint( d ){
> let t = ['N','NNE','NE','ENE',
> 'E','ESE','SE','SSE',
> 'S','SSW','SW','WSW',
> 'W','WNW','NW','NNW','N'];
> return t[ Math.round( d / 22.5 ) ];
> }
const compassPoint = ( d ) => {
return [
'N','NNE','NE','ENE',
'E','ESE','SE','SSE',
'S','SSW','SW','WSW',
'W','WNW','NW','NNW','N'
][
Math.round(d % 360 * 4 / 90)
];
};
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Weather App - one more round? luserdroog <luser.droog@gmail.com> - 2019-10-16 21:15 -0700
Re: Weather App - one more round? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2019-10-17 21:05 -0700
Re: Weather App - one more round? luserdroog <luser.droog@gmail.com> - 2019-10-17 21:31 -0700
Re: Weather App - one more round? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2019-10-18 12:42 -0700
Re: Weather App - one more round? luserdroog <luser.droog@gmail.com> - 2019-10-18 00:16 -0700
Re: Weather App - one more round? luserdroog <luser.droog@gmail.com> - 2019-10-18 00:44 -0700
Re: Weather App - one more round? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-10-18 13:23 +0200
Re: Weather App - one more round? luserdroog <luser.droog@gmail.com> - 2019-10-18 13:43 -0700
Re: Weather App - one more round? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-10-18 23:42 +0200
Re: Weather App - one more round? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2019-10-18 12:36 -0700
Re: Weather App - one more round? dr.j.r.stockton@gmail.com - 2019-10-18 02:25 -0700
Re: Weather App - one more round? luserdroog <luser.droog@gmail.com> - 2019-10-18 13:14 -0700
Re: Weather App - one more round? luserdroog <luser.droog@gmail.com> - 2019-10-18 13:35 -0700
Re: Weather App - one more round? luserdroog <luser.droog@gmail.com> - 2019-10-20 21:10 -0700
Re: Weather App - one more round? luserdroog <luser.droog@gmail.com> - 2019-10-20 21:20 -0700
Re: Weather App - one more round? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2019-10-21 04:21 -0700
Re: Weather App - one more round? luserdroog <luser.droog@gmail.com> - 2019-10-21 15:21 -0700
Re: Weather App - one more round? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2019-10-21 16:36 -0700
Re: Weather App - one more round? Julio Di Egidio <julio@diegidio.name> - 2019-10-26 04:20 -0700
Re: Weather App - one more round? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2019-10-26 07:45 -0700
Re: Weather App - one more round? luserdroog <luser.droog@gmail.com> - 2019-10-26 11:06 -0700
Re: Weather App - one more round? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2019-10-26 16:23 -0700
Re: Weather App - one more round? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-10-27 11:05 +0100
Re: Weather App - one more round? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2019-10-27 10:12 -0700
Re: Weather App - one more round? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-10-28 00:44 +0100
Re: Weather App - one more round? Julio Di Egidio <julio@diegidio.name> - 2019-10-28 05:50 -0700
Re: Weather App - one more round? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2019-10-28 06:40 -0700
Re: Weather App - one more round? Julio Di Egidio <julio@diegidio.name> - 2019-10-28 07:00 -0700
csiph-web