Beispiel #1
0
        public static float AsFloat(this byte input, float minValue, float maxValue)
        {
            if (minValue >= maxValue)
                throw new ArgumentException("minValue must be lower than maxValue");

            return minValue + (input.AsFloat() * (maxValue - minValue));
        }
        public static float? AsNullableFloat(this string inputValue)
        {
            if (string.IsNullOrWhiteSpace(inputValue))
            {
                return null;
            }

            return inputValue.AsFloat();
        }