Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1760)

Unified Diff: tracing/tracing/base/math/range.html

Issue 2771723003: [tracing] Move math utilities from base into their own subdirectory (attempt 2) (Closed)
Patch Set: rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tracing/tracing/base/math/quad_test.html ('k') | tracing/tracing/base/math/range_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/base/math/range.html
diff --git a/tracing/tracing/base/range.html b/tracing/tracing/base/math/range.html
similarity index 93%
rename from tracing/tracing/base/range.html
rename to tracing/tracing/base/math/range.html
index e81862ece135ad7fd0d6cf37e7e807994e28e3cd..54bcdd98a5a33873ab38ff5adf63a38498dd9186 100644
--- a/tracing/tracing/base/range.html
+++ b/tracing/tracing/base/math/range.html
@@ -7,7 +7,7 @@ found in the LICENSE file.
<link rel="import" href="/tracing/base/base.html">
<link rel="import" href="/tracing/base/iteration_helpers.html">
-<link rel="import" href="/tracing/base/math.html">
+<link rel="import" href="/tracing/base/math/math.html">
<script>
'use strict';
@@ -15,7 +15,7 @@ found in the LICENSE file.
/**
* @fileoverview Quick range computations.
*/
-tr.exportTo('tr.b', function() {
+tr.exportTo('tr.b.math', function() {
function Range() {
this.isEmpty_ = true;
this.min_ = undefined;
@@ -102,20 +102,20 @@ tr.exportTo('tr.b', function() {
enclosingPowers(opt_base) {
if (this.isEmpty) return new Range();
return Range.fromExplicitRange(
- tr.b.lesserPower(this.min_, opt_base),
- tr.b.greaterPower(this.max_, opt_base));
+ tr.b.math.lesserPower(this.min_, opt_base),
+ tr.b.math.greaterPower(this.max_, opt_base));
},
normalize: function(x) {
- return tr.b.normalize(x, this.min, this.max);
+ return tr.b.math.normalize(x, this.min, this.max);
},
lerp: function(x) {
- return tr.b.lerp(x, this.min, this.max);
+ return tr.b.math.lerp(x, this.min, this.max);
},
clamp: function(x) {
- return tr.b.clamp(x, this.min, this.max);
+ return tr.b.math.clamp(x, this.min, this.max);
},
equals: function(that) {
@@ -123,8 +123,8 @@ tr.exportTo('tr.b', function() {
return true;
if (this.isEmpty !== that.isEmpty)
return false;
- return (tr.b.approximately(this.min, that.min) &&
- tr.b.approximately(this.max, that.max));
+ return (tr.b.math.approximately(this.min, that.min) &&
+ tr.b.math.approximately(this.max, that.max));
},
containsExplicitRangeInclusive: function(min, max) {
« no previous file with comments | « tracing/tracing/base/math/quad_test.html ('k') | tracing/tracing/base/math/range_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698