UNPKG

maplibre-gl

Version:

BSD licensed community fork of mapbox-gl, a WebGL interactive maps library

13 lines (10 loc) 363 B
import {project} from './projection'; import Point from '@mapbox/point-geometry'; import {mat4} from 'gl-matrix'; describe('Projection', () => { test('matrix float precision', () => { const point = new Point(10.000000005, 0); const matrix = mat4.create(); expect(project(point, matrix).point.x).toBeCloseTo(point.x, 10); }); });