How to use the @here/harp-utils.MathUtils.max2 function in @here/harp-utils

To help you get started, we’ve selected a few @here/harp-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github heremaps / harp.gl / @here / harp-mapview / lib / text / TextElement.ts View on Github external
updateMinMaxZoomLevelsFromPoiInfo() {
        if (this.poiInfo !== undefined) {
            if (this.minZoomLevel === undefined) {
                this.minZoomLevel = MathUtils.min2(
                    this.poiInfo.iconMinZoomLevel,
                    this.poiInfo.textMinZoomLevel
                );
            }
            if (this.maxZoomLevel === undefined) {
                this.maxZoomLevel = MathUtils.max2(
                    this.poiInfo.iconMaxZoomLevel,
                    this.poiInfo.textMaxZoomLevel
                );
            }
        }
    }
}
github heremaps / harp.gl / @here / harp-mapview / lib / VisibleTileSet.ts View on Github external
tiles.forEach(tile => {
                minElevation = MathUtils.min2(minElevation, tile.minElevation);
                maxElevation = MathUtils.max2(
                    maxElevation,
                    tile.maxElevation + tile.maxGeometryHeight
                );
            });
        });
github heremaps / harp.gl / @here / harp-mapview / lib / copyrights / CopyrightInfo.ts View on Github external
for (const source of [a, b]) {
            if (source === undefined) {
                continue;
            }

            for (const sourceInfo of source) {
                const existingInfo = result.find(
                    findItem =>
                        findItem.id === sourceInfo.id ||
                        (findItem.label !== undefined && findItem.label === sourceInfo.label)
                );

                if (existingInfo === undefined) {
                    result.push({ ...sourceInfo });
                } else {
                    existingInfo.year = MathUtils.max2(sourceInfo.year, existingInfo.year);
                    existingInfo.label = getOptionValue(sourceInfo.label, existingInfo.label);
                    existingInfo.link = getOptionValue(sourceInfo.link, existingInfo.link);
                }
            }
        }
        return result;
    }