From 222d80ad9d59762de3c4537afd8ff8d2a994bf75 Mon Sep 17 00:00:00 2001 From: Florian Loitsch Date: Thu, 1 Dec 2016 11:01:44 -0800 Subject: [PATCH] Update documentation for num.clamp. (partially) fixes #27923 BUG= http://dartbug.com/27923 R=lrn@google.com Review URL: https://codereview.chromium.org/2541513002 . --- sdk/lib/core/num.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sdk/lib/core/num.dart b/sdk/lib/core/num.dart index 21f23eef183..ae9df01afc0 100644 --- a/sdk/lib/core/num.dart +++ b/sdk/lib/core/num.dart @@ -296,6 +296,9 @@ abstract class num implements Comparable { * The comparison is done using [compareTo] and therefore takes `-0.0` into * account. This also implies that [double.NAN] is treated as the maximal * double value. + * + * The arguments [lowerLimit] and [upperLimit] must form a valid range where + * `lowerLimit.compareTo(upperLimit) <= 0`. */ num clamp(num lowerLimit, num upperLimit);