1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
7 * @fileoverview Quick range computations.
9 base
.exportTo('base', function() {
13 this.min_
= undefined;
14 this.max_
= undefined;
18 __proto__
: Object
.prototype,
22 this.min_
= undefined;
23 this.max_
= undefined;
30 addRange: function(range
) {
33 this.addValue(range
.min
);
34 this.addValue(range
.max
);
37 addValue: function(value
) {
41 this.isEmpty_
= false;
44 this.max_
= Math
.max(this.max_
, value
);
45 this.min_
= Math
.min(this.min_
, value
);