Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: 'Nuther Challenge to the Code Monkeys

7 views
Skip to first unread message

%

unread,
Feb 20, 2024, 4:32:21 PM2/20/24
to
chrisv wrote:
> rbowman wrote:
>
>> int
>> get_azimuth_and_distance(double lat1, double lon1, double lat2, double
>> lon2,
>>
>> double* azimuth, double* distance)
>> {
>> double rlat1, rlon1;
>> double rlat2, rlon2;
>> double pi;
>> double a;
>> double d;
>>
>> pi = 4.0 * atan(1.0);
>> rlat1 = (lat1*pi)/180.0;
>> rlon1 = (lon1*pi)/180.0;
>> rlat2 = (lat2*pi)/180.0;
>> rlon2 = (lon2*pi)/180.0;
>>
>> d = acos(sin(rlat1)*sin(rlat2)+cos(rlat1)*cos(rlat2)*cos(rlon1-
>> rlon2));
>> if (isnan(d)) {
>> return -1;
>> }
>> if (sin(rlon2-rlon1) < 0) {
>> a =
>> acos((sin(rlat2)-sin(rlat1)*cos(d))/
>> (sin(d)*cos(rlat1)));
>> }
>> else {
>> a =
>> 2*pi-acos((sin(rlat2)-sin(rlat1)*cos(d))/
>> (sin(d)*cos(rlat1)));
>> }
>> if (isnan(a)) {
>> return -1;
>> }
>>
>> *azimuth = (a*(180.0/pi));
>> *distance = ((d*180.0*60)/pi) * (6076.11549/5280.0);
>> return 0;
>> }
>
> I don't know if that needed to be tested, or if a clean compile was
> good enough to know that it will work correctly.
>
> According to some shameless liar, some dumb fscking snit.
>

%

unread,
Feb 21, 2024, 4:45:04 AM2/21/24
to
sometimes assworms just hit send without adding anything

Chris Ahlstrom

unread,
Feb 21, 2024, 10:28:20 AM2/21/24
to
% wrote this copyrighted missive and expects royalties:

> % wrote:
>> chrisv wrote:
>>>
>>> I don't know if that needed to be tested, or if a clean compile was
>>> good enough to know that it will work correctly.
>>>
>>> According to some shameless liar, some dumb fscking snit.

He was referring to a troll he quoted in his message signature, lied
about something chrisv said.

> sometimes assworms just hit send without adding anything

--
You are dishonest, but never to the point of hurting a friend.

%

unread,
Feb 21, 2024, 11:30:56 AM2/21/24
to
Chris Ahlstrom wrote:
> % wrote this copyrighted missive and expects royalties:
>
>> % wrote:
>>> chrisv wrote:
>>>>
>>>> I don't know if that needed to be tested, or if a clean compile was
>>>> good enough to know that it will work correctly.
>>>>
>>>> According to some shameless liar, some dumb fscking snit.
>
> He was referring to a troll he quoted in his message signature, lied
> about something chrisv said.
>
>> sometimes assworms just hit send without adding anything
>
but i move the post to another place
0 new messages