Skip to content

Commit

Permalink
chore: Add SPDX license headers (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibgreen authored Jul 25, 2024
1 parent 0b3def7 commit ca649ff
Show file tree
Hide file tree
Showing 58 changed files with 200 additions and 348 deletions.
5 changes: 4 additions & 1 deletion modules/core/src/classes/base/math-array.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// math.gl, MIT License
// math.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import {NumericArray} from '@math.gl/types';
import {ConfigurationOptions, config, formatValue, equals, isArray} from '../../lib/common';

Expand Down
5 changes: 4 additions & 1 deletion modules/core/src/classes/base/matrix.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// math.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors
// Copyright (c) 2017 Uber Technologies, Inc.
// MIT License

import {NumericArray} from '@math.gl/types';
import {MathArray} from './math-array';
import {checkNumber} from '../../lib/validators';
Expand Down
5 changes: 4 additions & 1 deletion modules/core/src/classes/base/vector.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// math.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors
// Copyright (c) 2017 Uber Technologies, Inc.
// MIT License

import {NumericArray} from '@math.gl/types';
import {MathArray} from './math-array';
import {checkNumber} from '../../lib/validators';
Expand Down
5 changes: 4 additions & 1 deletion modules/core/src/classes/euler.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// math.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors
// Copyright (c) 2017 Uber Technologies, Inc.
// MIT License

import {MathArray} from './base/math-array';
import {Quaternion} from './quaternion';
import {NumericArray} from '@math.gl/types';
Expand Down
4 changes: 3 additions & 1 deletion modules/core/src/classes/matrix3.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// math.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors
// Copyright (c) 2017 Uber Technologies, Inc.
// MIT License

import {NumericArray} from '@math.gl/types';
import {Matrix} from './base/matrix';
Expand Down
4 changes: 3 additions & 1 deletion modules/core/src/classes/matrix4.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// math.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors
// Copyright (c) 2017 Uber Technologies, Inc.
// MIT License

import {NumericArray} from '@math.gl/types';
import {Matrix} from './base/matrix';
Expand Down
5 changes: 4 additions & 1 deletion modules/core/src/classes/pose.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// math.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors
// Copyright (c) 2017 Uber Technologies, Inc.
// MIT License

import {Matrix4} from './matrix4';
import {Vector3} from './vector3';
import {Euler} from './euler';
Expand Down
5 changes: 4 additions & 1 deletion modules/core/src/classes/quaternion.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// math.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors
// Copyright (c) 2017 Uber Technologies, Inc.
// MIT License

import {NumericArray} from '@math.gl/types';
import {MathArray} from './base/math-array';
import {checkNumber, checkVector} from '../lib/validators';
Expand Down
5 changes: 4 additions & 1 deletion modules/core/src/classes/spherical-coordinates.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// math.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors
// Copyright (c) 2017 Uber Technologies, Inc.
// MIT License

// Adaptation of THREE.js Spherical class, under MIT license
import {NumericArray} from '@math.gl/types';
import {Vector3} from './vector3';
Expand Down
5 changes: 4 additions & 1 deletion modules/core/src/classes/vector2.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// math.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors
// Copyright (c) 2017 Uber Technologies, Inc.
// MIT License

import {Vector} from './base/vector';
import {config, isArray} from '../lib/common';
import {checkNumber} from '../lib/validators';
Expand Down
5 changes: 4 additions & 1 deletion modules/core/src/classes/vector3.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// math.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors
// Copyright (c) 2017 Uber Technologies, Inc.
// MIT License

import {NumericArray} from '@math.gl/types';
import {Vector} from './base/vector';
import {config, isArray} from '../lib/common';
Expand Down
4 changes: 3 additions & 1 deletion modules/core/src/classes/vector4.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// math.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors
// Copyright (c) 2017 Uber Technologies, Inc.
// MIT License

import {NumericArray} from '@math.gl/types';
/* eslint-disable camelcase */
Expand Down
4 changes: 4 additions & 0 deletions modules/core/src/gl-matrix/wip/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// math.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

// @eslint-disable
// @ts-nocheck

Expand Down
4 changes: 4 additions & 0 deletions modules/core/src/gl-matrix/wip/mat2.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// math.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

// @ts-nocheck
/* eslint-disable */

Expand Down
4 changes: 4 additions & 0 deletions modules/core/src/gl-matrix/wip/mat2d.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// math.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

// @ts-nocheck
/* eslint-disable */

Expand Down
4 changes: 4 additions & 0 deletions modules/core/src/gl-matrix/wip/quat2.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// math.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

// @ts-nocheck
/* eslint-disable */
import * as glMatrix from './common.js';
Expand Down
4 changes: 3 additions & 1 deletion modules/core/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// luma.gl, MIT license
// math.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

// types
export type {TypedArray, TypedArrayConstructor, NumberArray, NumericArray} from '@math.gl/types';
Expand Down
4 changes: 4 additions & 0 deletions modules/core/src/lib/assert.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// math.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

export function assert(condition: unknown, message?: string): void {
if (!condition) {
throw new Error(`math.gl assertion ${message}`);
Expand Down
4 changes: 3 additions & 1 deletion modules/core/src/lib/common.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// math.gl, MIT license
// math.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import type {NumericArray} from '@math.gl/types';

Expand Down
4 changes: 4 additions & 0 deletions modules/core/src/lib/gl-matrix-extras.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// math.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

/* eslint-disable camelcase */
import {NumericArray} from '@math.gl/types';
// vec2 additions
Expand Down
4 changes: 4 additions & 0 deletions modules/core/src/lib/gl-matrix.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// math.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

type NumericArray =
| Int8Array
| Uint8Array
Expand Down
4 changes: 4 additions & 0 deletions modules/core/src/lib/math-utils.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// math.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

// NOTE: Added to make Cesium-derived test cases work
// TODO: Determine if/how to keep
export const EPSILON1 = 1e-1;
Expand Down
23 changes: 4 additions & 19 deletions modules/core/src/lib/validators.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,7 @@
// Copyright (c) 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// math.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import {NumberArray} from '@math.gl/types';
import {config} from './common';

Expand Down
21 changes: 3 additions & 18 deletions modules/core/test/bench.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,7 @@
// math.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

import javascriptBench from './lib/javascript.bench';
import commonBench from './lib/common.bench';
Expand Down
21 changes: 3 additions & 18 deletions modules/core/test/classes/classes.bench.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,7 @@
// math.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

import {configure, Vector2, Vector3, Vector4, Matrix3, Matrix4} from '@math.gl/core';

Expand Down
4 changes: 4 additions & 0 deletions modules/core/test/classes/euler.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// math.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import {Euler, Matrix4, Quaternion, Pose} from '@math.gl/core';
import test from 'tape-promise/tape';
import {tapeEquals} from 'test/utils/tape-assertions';
Expand Down
4 changes: 3 additions & 1 deletion modules/core/test/classes/matrix3.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// math.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors
// Copyright (c) 2017 Uber Technologies, Inc.
// MIT License

/* eslint-disable max-statements */
import {Matrix3, config} from '@math.gl/core';
Expand Down
21 changes: 3 additions & 18 deletions modules/core/test/classes/matrix4.bench.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,7 @@
// math.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

import {configure, Vector4, Matrix4, mat4} from '@math.gl/core';

Expand Down
4 changes: 3 additions & 1 deletion modules/core/test/classes/matrix4.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// math.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors
// Copyright (c) 2017 Uber Technologies, Inc.
// MIT License

/* eslint-disable max-statements */
import {Matrix4, Vector3, config, configure} from '@math.gl/core';
Expand Down
4 changes: 4 additions & 0 deletions modules/core/test/classes/pose.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// math.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import test from 'tape-promise/tape';
import {Matrix4, Vector3, equals} from '@math.gl/core';
import {Euler, Pose} from '@math.gl/core';
Expand Down
21 changes: 3 additions & 18 deletions modules/core/test/classes/quaternion.spec.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,7 @@
// math.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors
// Copyright (c) 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the 'Software'), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

/* eslint-disable*/
import test from 'tape-promise/tape';
Expand Down
4 changes: 3 additions & 1 deletion modules/core/test/classes/spherical-coordinates.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// math.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors
// Copyright (c) 2017 Uber Technologies, Inc.
// MIT License

/* eslint-disable max-statements, max-depth */
import test from 'tape-promise/tape';
Expand Down
21 changes: 3 additions & 18 deletions modules/core/test/classes/vector2.bench.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,7 @@
// math.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

import {Vector2} from '@math.gl/core';

Expand Down
Loading

0 comments on commit ca649ff

Please sign in to comment.