GYULAI Mihaly <[EMAIL PROTECTED]> writes:

> Idea:
> 
> It would be better to have those numbers in metric also as rounded
> values, for example 760 m (2500 feet), 2400 m (8000 feet). (or maybe
> we can give 750 m and 2500 m)
> 
> What do you think? Can it be easily implemented?

I think it's a good idea. I haven't tried yet, but I think it'll be
easy to implement. We'll probably need a function that takes two
arguments: a float that should be rounded, and a number that tells it
how many decimal-places to use. It should work like this:

round(12345.678, 2)  // 12345.68
round(12345.678, 0)  // 12346
round(12345.678, -2) // 12300

Does that make any sense?

> I think that such numbers are rounded officially, because we can
> handle round numbers more easily...
> 
> That's why it would be also better to have round numbers in metric,
> too.

Yes, you're right. I'm currently re-organizing things a little. One of
the new cool features is, that it won't be necessary to use a real
database to look-up the names of the stations. It can be done by
searching through a text file.

Right now it works by doing a binary-search in a file, but I'm
planning to use a hash-function instead, so that one only needs to
make one seek in the file. (If anybody thinks this is overkill, then
remember that I'm doing this for my own pleasure. It's actually great
fun to try these things out for real, instead of just reading about
them :-)

-- 
Best regards,
Martin Geisler

Checkout http://www.gimpster.com for:
PHP Weather => Shows the current weather on your webpages.
PHP Shell   => A telnet-connection (almost :-) in a PHP page.

Reply via email to