Heufneutje / PyHeufyBot

A modular IRC bot written in Python, using Twisted. Abandoned, most popular modules have been ported to https://github.com/DesertBot/DesertBot
MIT License
2 stars 5 forks source link

Fix m/s to Beaufort conversion #71

Closed HubbeKing closed 5 years ago

HubbeKing commented 5 years ago

BFT numbers were off by one, I feex.

HubbeKing commented 5 years ago

The way the translation dict is used, means that for any key: value pair, if weather speed is below value, the value for the previous key is returned as the Beaufort Scale number. Thus, 0.2 maps to 1, as if wind speed is <0.2, we are at Beaufort 0. (Technically it's 0.5, the Beaufort scale is a BIT iffy on where 0 ends and 1 begins)

Heufneutje commented 5 years ago

You discovered the same thing I did :P I already pulled your changes manually and fixed it myself so I'll go ahead and close this.