Pure wind-speed conversions and unit labels, no SDK behind them. More...
#include "units/wind.h"Functions | |
| static int | scale_rounded (int kmh, int per_thousand) |
| Scales a speed by a factor in thousandths and rounds to the nearest whole number. | |
| int | wind_from_kmh (int kmh, WindUnit unit) |
| Convert a km/h wind speed into the chosen unit. | |
| const char * | wind_unit_label (WindUnit unit) |
| The short label for a wind unit. | |
Pure wind-speed conversions and unit labels, no SDK behind them.
|
static |
Scales a speed by a factor in thousandths and rounds to the nearest whole number.
A half rounds away from zero, so a negative speed rounds the same way as its positive.
| kmh | The speed in km/h. |
| per_thousand | How many thousandths of the unit one km/h is. |