Remove use of goog.math.isFiniteNumber()

This replaces `goog.math.isFiniteNumber()` with `isFinite()`.
This commit is contained in:
Frederic Junod
2016-02-23 10:03:26 +01:00
parent 996e119b25
commit 84288cd8bb
2 changed files with 2 additions and 4 deletions

View File

@@ -2,7 +2,6 @@ goog.provide('ol.reproj');
goog.require('goog.labs.userAgent.browser');
goog.require('goog.labs.userAgent.platform');
goog.require('goog.math');
goog.require('ol.dom');
goog.require('ol.extent');
goog.require('ol.math');
@@ -61,7 +60,7 @@ ol.reproj.calculateSourceResolution = function(sourceProj, targetProj,
sourceProj.getPointResolution(sourceResolution, sourceCenter) /
sourceResolution;
if (goog.math.isFiniteNumber(compensationFactor) && compensationFactor > 0) {
if (isFinite(compensationFactor) && compensationFactor > 0) {
sourceResolution /= compensationFactor;
}

View File

@@ -2,7 +2,6 @@ goog.provide('ol.reproj.Tile');
goog.provide('ol.reproj.TileFunctionType');
goog.require('goog.asserts');
goog.require('goog.math');
goog.require('ol.Tile');
goog.require('ol.TileState');
goog.require('ol.events');
@@ -145,7 +144,7 @@ ol.reproj.Tile = function(sourceProj, sourceTileGrid,
var sourceResolution = ol.reproj.calculateSourceResolution(
sourceProj, targetProj, targetCenter, targetResolution);
if (!goog.math.isFiniteNumber(sourceResolution) || sourceResolution <= 0) {
if (!isFinite(sourceResolution) || sourceResolution <= 0) {
// invalid sourceResolution -> EMPTY
// probably edges of the projections when no extent is defined
this.state = ol.TileState.EMPTY;