Compare commits
2 Commits
master
...
strict-nul
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
33b58f84b8 | ||
|
|
4b4159df0d |
@ -44,8 +44,8 @@ export default class Mat33 {
|
||||
constructor(a?: Vec3, b?: Vec3, c?: Vec3) {
|
||||
if (typeof a === 'object' && a !== null) {
|
||||
this.ex = Vec3.clone(a);
|
||||
this.ey = Vec3.clone(b);
|
||||
this.ez = Vec3.clone(c);
|
||||
this.ey = Vec3.clone(b!);
|
||||
this.ez = Vec3.clone(c!);
|
||||
} else {
|
||||
this.ex = Vec3.zero();
|
||||
this.ey = Vec3.zero();
|
||||
|
||||
@ -139,7 +139,7 @@ export default class Transform {
|
||||
static mul(a, b) {
|
||||
if (Array.isArray(b)) {
|
||||
_ASSERT && Transform.assert(a);
|
||||
const arr = [];
|
||||
const arr: Vec2[] | Transform[] = [];
|
||||
for (let i = 0; i < b.length; i++) {
|
||||
arr[i] = Transform.mul(a, b[i]);
|
||||
}
|
||||
@ -158,7 +158,7 @@ export default class Transform {
|
||||
// tslint:disable-next-line:typedef
|
||||
static mulAll(a: Transform, b) {
|
||||
_ASSERT && Transform.assert(a);
|
||||
const arr = [];
|
||||
const arr: Vec2[] | Transform[] = [];
|
||||
for (let i = 0; i < b.length; i++) {
|
||||
arr[i] = Transform.mul(a, b[i]);
|
||||
}
|
||||
|
||||
@ -183,7 +183,7 @@ export default class Vec2 {
|
||||
* @deprecated Use setCombine or setMul
|
||||
*/
|
||||
wSet(a: number, v: Vec2, b?: number, w?: Vec2): Vec2 {
|
||||
if (typeof b !== 'undefined' || typeof w !== 'undefined') {
|
||||
if (typeof b !== 'undefined' && typeof w !== 'undefined') {
|
||||
return this.setCombine(a, v, b, w);
|
||||
} else {
|
||||
return this.setMul(a, v);
|
||||
@ -235,7 +235,7 @@ export default class Vec2 {
|
||||
* @deprecated Use addCombine or addMul
|
||||
*/
|
||||
wAdd(a: number, v: Vec2, b?: number, w?: Vec2): Vec2 {
|
||||
if (typeof b !== 'undefined' || typeof w !== 'undefined') {
|
||||
if (typeof b !== 'undefined' && typeof w !== 'undefined') {
|
||||
return this.addCombine(a, v, b, w);
|
||||
} else {
|
||||
return this.addMul(a, v);
|
||||
@ -275,7 +275,7 @@ export default class Vec2 {
|
||||
* @deprecated Use subCombine or subMul
|
||||
*/
|
||||
wSub(a: number, v: Vec2, b?: number, w?: Vec2): Vec2 {
|
||||
if (typeof b !== 'undefined' || typeof w !== 'undefined') {
|
||||
if (typeof b !== 'undefined' && typeof w !== 'undefined') {
|
||||
return this.subCombine(a, v, b, w);
|
||||
} else {
|
||||
return this.subMul(a, v);
|
||||
|
||||
@ -6,8 +6,7 @@
|
||||
},
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
// "strictNullChecks": true,
|
||||
// "noImplicitAny": true,
|
||||
"strictNullChecks": true,
|
||||
"lib": ["ES2015", "DOM"],
|
||||
"stripInternal": true,
|
||||
"target": "ES5"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user