[Freeciv-Dev] Re: directional system: more magic code cleanups
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
At 10:19 AM 01/09/25 +0200, Raimar Falke wrote:
>On Tue, Sep 25, 2001 at 03:11:26AM -0400, Ross W. Wetmore wrote:
>> At 09:12 AM 01/09/24 +0200, Raimar Falke wrote:
>Ok. However every piece of code which will get into cvs will be
>reformatted.
You obfuscated by you, right?
>Ok. From a test game:
>
>2: src=(43,4) dest=50,7)
>2: orig=SE, jason=SE, ross=E, raimar=SE, raimar2=SE
>
>So we see that diff_x=7 diff_y=3. So we have a gradient of
>m=diff_y/diff_x=3/7.
>
>Now comes the tricky part where your error is: which gradient is the
>border between the SE part and the E part? I think your answer would
>be 0.5. Probably because m=1 divides the quadrant. And 1/2 would
>quarter the quadrant. THIS IS WRONG. The correct gradient is
>tan(pi/8)=0.4142... It is now no surprise that the gradient from above
>m=3/7=0.42857... is between 0.4142 and 0.5.
Raimar LOOK AT your numbers. You need to move 7 east and 3 south. It
should be clear as mud that the straightest direction looks like this
with the first move to the EAST.
0 1 . . . . . .
. . 2 3 . . . .
. . . . 4 5 . .
. . . . . . 6 7
Your trig functions are clearly a bit out of whack. Do you know why?
>Has this showed up during your testing? No. This is not
>surprising. The example of the useless code in goto_zoc_ok should us
>teach that you have to "really" test a method which can not easily be
>tested by the gui.
Yes Raimar. We see how well you tested your 3 buggy algorithms.
>Did I expect that you find this error by yourself after pointing out
>that there are differences (I didn't say error here)? Yes.
Did you read the section on trig vs game distances that you dropped
from the reply??? Do you now understand what this was telling you?
>So if you come up with a new version of your method I will be happy to
>test and profile it.
I hope you come up with a new version that agrees with mine, or stop
this nonsense and just admit that you hasve a bit more to learn in
some things, and pay attention when people tell you something.
> Raimar
>
>--
> email: rf13@xxxxxxxxxxxxxxxxx
> 1 + 1 = 3, for large values of 1
Cheers,
RossW
- [Freeciv-Dev] Re: directional system: more magic code cleanups, (continued)
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Raimar Falke, 2001/09/21
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Ross W. Wetmore, 2001/09/21
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Raimar Falke, 2001/09/23
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Ross W. Wetmore, 2001/09/24
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Raimar Falke, 2001/09/24
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Ross W. Wetmore, 2001/09/25
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Raimar Falke, 2001/09/25
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Gregory Berkolaiko, 2001/09/25
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Raimar Falke, 2001/09/25
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Ross W. Wetmore, 2001/09/26
- [Freeciv-Dev] Re: directional system: more magic code cleanups,
Ross W. Wetmore <=
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Raimar Falke, 2001/09/26
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Greg Wooledge, 2001/09/26
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Raimar Falke, 2001/09/26
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Tony Stuckey, 2001/09/26
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Ross W. Wetmore, 2001/09/26
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Ross W. Wetmore, 2001/09/26
- [Freeciv-Dev] Re: directional system: more magic code cleanups, Raimar Falke, 2001/09/27
- [Freeciv-Dev] Trigonometry of Freeciv, Gregory Berkolaiko, 2001/09/27
- [Freeciv-Dev] Re: Trigonometry of Freeciv, Raimar Falke, 2001/09/27
- [Freeciv-Dev] Re: Trigonometry of Freeciv, Raahul Kumar, 2001/09/29
|
|