Mistři v programování na #hovnokod

C# #4673

Jak snadno spočítat polovinu něčeho.

    /// <summary>
    /// Class for extensions.
    /// </summary>
    public static class Extensions
    {
        /// <summary>
        /// Count the half value.
        /// </summary>
        /// <param name="valueToBeHalved">Value to be halved.</param>
        /// <returns>Returns half value</returns>
        public static double Halved(this double valueToBeHalved)
        {
            double halfCoefficient = 0.5;
            return valueToBeHalved * halfCoefficient;
        }
    }

Anonymous,