private int ToBendValue(float gpxValue) { // NOTE: strange IEEE behavior here: // (int)(100f * 0.04f) => 3 // (100f*0.04f) => 4.0f => (int)4.0f => 4 var converted = gpxValue*BendPointValueFactor; return (int)(converted); }