| Index: tracing/tracing/base/math.html
|
| diff --git a/tracing/tracing/base/math.html b/tracing/tracing/base/math.html
|
| index 59b5d3117b9987785db7005d8e2d1311cacdf85d..89d7ea472609d6338e11a56b6938aa754ca0fdad 100644
|
| --- a/tracing/tracing/base/math.html
|
| +++ b/tracing/tracing/base/math.html
|
| @@ -31,6 +31,13 @@ found in the LICENSE file.
|
| 'use strict';
|
|
|
| tr.exportTo('tr.b', function() {
|
| + /* Returns true when x and y are within delta of each other. */
|
| + function approximately(x, y, delta) {
|
| + if (delta === undefined)
|
| + delta = 1e-9;
|
| + return Math.abs(x - y) < delta;
|
| + }
|
| +
|
| function clamp(x, lo, hi) {
|
| return Math.min(Math.max(x, lo), hi);
|
| }
|
| @@ -156,6 +163,7 @@ tr.exportTo('tr.b', function() {
|
| };
|
|
|
| return {
|
| + approximately: approximately,
|
| clamp: clamp,
|
| lerp: lerp,
|
| normalize: normalize,
|
|
|