From 227e807f145ab0ef90cceb621176ad4560c65cdd Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Wed, 10 Mar 2021 12:56:25 +0000 Subject: [PATCH] (#15) Improve xmldoc for float/double.Round --- X10D/src/DoubleExtensions/DoubleExtensions.cs | 12 ++++++------ X10D/src/SingleExtensions/SingleExtensions.cs | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/X10D/src/DoubleExtensions/DoubleExtensions.cs b/X10D/src/DoubleExtensions/DoubleExtensions.cs index c859e58..62ded6f 100644 --- a/X10D/src/DoubleExtensions/DoubleExtensions.cs +++ b/X10D/src/DoubleExtensions/DoubleExtensions.cs @@ -109,14 +109,14 @@ namespace X10D.DoubleExtensions } /// - /// Rounds to the nearest value. + /// Rounds the current value to the nearest multiple of a specified number. /// - /// The value to round. - /// The nearest value. - /// Returns the rounded value. - public static double Round(this double v, double nearest = 1) + /// The value to round. + /// The nearest multiple to which should be rounded. + /// rounded to the nearest multiple of . + public static double Round(this double value, double nearest = 1) { - return Math.Round(v / nearest) * nearest; + return Math.Round(value / nearest) * nearest; } private static double LerpInternal(double a, double b, double t) diff --git a/X10D/src/SingleExtensions/SingleExtensions.cs b/X10D/src/SingleExtensions/SingleExtensions.cs index 45d092d..976726b 100644 --- a/X10D/src/SingleExtensions/SingleExtensions.cs +++ b/X10D/src/SingleExtensions/SingleExtensions.cs @@ -110,14 +110,14 @@ namespace X10D.SingleExtensions } /// - /// Rounds to the nearest value. + /// Rounds the current value to the nearest multiple of a specified number. /// - /// The value to round. - /// The nearest value. - /// Returns the rounded value. - public static float Round(this float v, float nearest = 1) + /// The value to round. + /// The nearest multiple to which should be rounded. + /// rounded to the nearest multiple of . + public static float Round(this float value, float nearest = 1) { - return (float)((double)v).Round(nearest); + return (float)((double)value).Round(nearest); } } }