summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/catapult/tracing/tracing/base/math_test.html
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/catapult/tracing/tracing/base/math_test.html')
-rw-r--r--chromium/third_party/catapult/tracing/tracing/base/math_test.html42
1 files changed, 0 insertions, 42 deletions
diff --git a/chromium/third_party/catapult/tracing/tracing/base/math_test.html b/chromium/third_party/catapult/tracing/tracing/base/math_test.html
deleted file mode 100644
index d342aad5f66..00000000000
--- a/chromium/third_party/catapult/tracing/tracing/base/math_test.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-<link rel="import" href="/tracing/base/math.html">
-
-<script>
-'use strict';
-
-tr.b.unittest.testSuite(function() {
- test('erf', function() {
- assert.closeTo(-1, tr.b.erf(-1e10), 1e-6);
- assert.closeTo(-0.8427, tr.b.erf(-1), 1e-6);
- assert.closeTo(-0.5205, tr.b.erf(-0.5), 1e-6);
- assert.closeTo(0, tr.b.erf(0), 1e-6);
- assert.closeTo(0.5205, tr.b.erf(0.5), 1e-6);
- assert.closeTo(0.8427, tr.b.erf(1), 1e-6);
- assert.closeTo(1, tr.b.erf(1e10), 1e-6);
- });
-
- test('clamping', function() {
- assert.equal(tr.b.clamp(2, 1, 3), 2);
- assert.equal(tr.b.clamp(1, 1, 3), 1);
- assert.equal(tr.b.clamp(0, 1, 3), 1);
- assert.equal(tr.b.clamp(3, 1, 3), 3);
- assert.equal(tr.b.clamp(4, 1, 3), 3);
- });
-
- test('interpolatePiecewiseFunction', function() {
- var points = [[0, 0], [0.1, 0.5], [1, 1]];
- assert.equal(0, vec2.interpolatePiecewiseFunction(points, -1));
- assert.equal(0, vec2.interpolatePiecewiseFunction(points, 0));
- assert.equal(0.25, vec2.interpolatePiecewiseFunction(points, 0.05));
- assert.equal(0.5, vec2.interpolatePiecewiseFunction(points, 0.1));
- assert.equal(0.75, vec2.interpolatePiecewiseFunction(points, 0.55));
- assert.equal(1, vec2.interpolatePiecewiseFunction(points, 1));
- assert.equal(1, vec2.interpolatePiecewiseFunction(points, 2));
- });
-});
-</script>