William Wall
831505c425
Fix type check in ol/math
...
tsc considers everything in the else block to be of type 'never',
since it thinks that cosh is permanently defined for Math. Casting
back to Math in the else block fixes the error.
2018-09-29 16:40:15 -06:00
Tim Schaub
d12ef20b12
Use Array<Foo> instead of Array.<Foo>
2018-07-25 18:32:43 -07:00
Tim Schaub
b8c9125602
Remove lint
2018-07-18 10:35:54 -06:00
Tim Schaub
ad62739a6e
Use blocked scoped variables
...
In addition to using const and let, this also upgrades our linter config and removes lint (mostly whitespace).
2018-01-12 00:50:30 -07:00
Ron Young
a11208d126
rename _ol_math_ imports
2017-12-20 19:31:00 -06:00
Frederic Junod
9349ba5403
Named export for ol/asserts
2017-12-18 10:33:41 +01:00
Tim Schaub
7f47883c48
Transformed
2017-12-12 06:53:18 -07:00
Frederic Junod
5763e1d145
Remove unused goog.require
2017-02-03 12:40:53 +01:00
Tim Schaub
137cdc04c8
Remove ol.DEBUG
2017-01-01 20:37:52 -07:00
Marc Jansen
ae929c1b6d
Require ol in ol.math
2016-09-02 11:18:53 +02:00
Andreas Hocevar
d1e4b33760
Rename goog.DEBUG to ol.DEBUG
2016-08-31 21:10:01 +02:00
Frederic Junod
ca7fbc25de
Add missing goog.require('ol.asserts')
2016-08-17 09:57:21 +02:00
Tim Schaub
d02cf1e7a9
Shuffle assertions
2016-08-12 10:53:47 -06:00
Tim Schaub
feb7713225
Remove lint
2016-08-07 13:28:19 -06:00
Andreas Hocevar
e0015b3d4e
Use goog.DEBUG instead of ol.DEBUG for now
2016-08-04 11:29:54 +02:00
Andreas Hocevar
6f5ed17fc5
Remove goog.asserts.*
...
This pull requests replaces type check hint assertions with type casts,
library sanity check assertions with conditional console.assert statements
in debug mode, and runtime sanity checks with assertions that throw an
ol.AssertionError with an error code for lookup outside the library.
2016-08-04 11:29:54 +02:00
Nicholas Latham
2ee1969de7
Remove goog.math.modulo and goog.math.lerp
2016-04-04 09:43:24 +02:00
Marc Jansen
55a969f95f
Merge pull request #4248 from marcjansen/math-es6-2015
...
Use Math.cosh of ES6/2015 if available
2015-10-18 21:26:56 +02:00
Petr Sloup
70021be919
Use lower-case parameter names even for matrices
2015-10-16 15:45:34 +02:00
Petr Sloup
44a64ba451
Add ol.math.solveLinearSystem
2015-10-16 09:28:40 +02:00
Marc Jansen
cd99d44704
Use Math.cosh of ES6/2015 if available
2015-10-14 21:54:45 +02:00
Marc Jansen
449131a516
Use MDN polyfill for Math.cosh
...
This commit replaces the current implementation of ol.math.cosh with the
reference implementation of the Mozilla developer network. This method
only has one call to the Math.exp-function compared to two in the original
implementation.
See also: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Math/cosh
2015-10-14 21:54:45 +02:00
Marc Jansen
2f5ccbd54d
Remove unused ol.math-methods
2015-10-14 21:40:42 +02:00
Marc Jansen
47a7b03e0e
Remove use of toDegrees/toRadians util functions
...
Instead of goog.math.toRadians and goog.math.toDegrees, we now use
our own implementations of these basic conversion functions.
2015-10-12 21:16:03 +02:00
Tim Schaub
f746cb7f57
Use ol.math.clamp()
2015-09-27 12:26:21 -06:00
Bart van den Eijnden
47ce127a10
Add assert messages for all assertions up until ol.renderer.vector.
2015-03-30 22:55:23 +02:00
Tom Payne
6a00c14841
Move squaredDistance and squaredSegmentDistance into ol.math
2014-03-12 13:26:14 +01:00
Tom Payne
4be8c991f7
Add missing Closure Library requires
2013-04-06 14:28:12 +02:00
Tom Payne
72437ff57b
Use more compact constants
2013-03-22 17:33:19 +01:00
Tom Payne
57abbddf50
Add ol.math.roundUpToPowerOfTwo
2013-03-22 17:25:31 +01:00
Tom Payne
00ce5c6a78
Add hyperbolic functions
2013-03-03 14:47:25 +01:00