File tree Expand file tree Collapse file tree 8 files changed +9
-63
lines changed Expand file tree Collapse file tree 8 files changed +9
-63
lines changed Original file line number Diff line number Diff line change
1
+ Version 2.1.0 (August 29th 2020)
2
+ -----------------------------
3
+ * delete setFromArray() method in Vector2 and Vector3 classes
4
+
1
5
Version 2.0.1 (May 13th 2020)
2
6
-----------------------------
3
7
* fix lookAtRH() method in Matrix4x3 class
Original file line number Diff line number Diff line change @@ -215,7 +215,6 @@ export declare class Vector2 {
215
215
constructor ( x ?: number , y ?: number ) ;
216
216
isOrigin ( ) : boolean ;
217
217
isPositive ( ) : boolean ;
218
- setFromArray ( array : number [ ] , offset ?: number ) : Vector2 ;
219
218
toArray ( ) : number [ ] ;
220
219
toString ( ) : string ;
221
220
set ( x : number , y : number ) : Vector2 ;
@@ -255,17 +254,13 @@ export declare class Vector2 {
255
254
lerp ( min : Vector2 , max : Vector2 , amount : number ) : Vector2 ;
256
255
dotProduct ( v : Vector2 ) : number ;
257
256
}
258
- export interface Vector3 {
259
- [ key : string ] : any ;
260
- }
261
257
export declare class Vector3 {
262
258
x : number ;
263
259
y : number ;
264
260
z : number ;
265
261
constructor ( x ?: number , y ?: number , z ?: number ) ;
266
262
isOrigin ( ) : boolean ;
267
263
isPositive ( ) : boolean ;
268
- setFromArray ( array : number [ ] , offset ?: number ) : Vector3 ;
269
264
toArray ( ) : number [ ] ;
270
265
toString ( ) : string ;
271
266
set ( x : number , y : number , z : number ) : Vector3 ;
Original file line number Diff line number Diff line change @@ -309,14 +309,6 @@ var Type6 = (function (exports) {
309
309
Vector2 . prototype . isPositive = function ( ) {
310
310
return this . x >= 0 && this . y >= 0 ? true : false ;
311
311
} ;
312
- Vector2 . prototype . setFromArray = function ( array , offset ) {
313
- if ( offset === undefined ) {
314
- offset = 0 ;
315
- }
316
- this . x = array [ offset ] ;
317
- this . y = array [ offset + 1 ] ;
318
- return this ;
319
- } ;
320
312
Vector2 . prototype . toArray = function ( ) {
321
313
return [ this . x , this . y ] ;
322
314
} ;
@@ -692,15 +684,6 @@ var Type6 = (function (exports) {
692
684
Vector3 . prototype . isPositive = function ( ) {
693
685
return this . x >= 0 && this . y >= 0 && this . z >= 0 ? true : false ;
694
686
} ;
695
- Vector3 . prototype . setFromArray = function ( array , offset ) {
696
- if ( offset === undefined ) {
697
- offset = 0 ;
698
- }
699
- this . x = array [ offset ] ;
700
- this . y = array [ offset + 1 ] ;
701
- this . z = array [ offset + 2 ] ;
702
- return this ;
703
- } ;
704
687
Vector3 . prototype . toArray = function ( ) {
705
688
return [ this . x , this . y , this . z ] ;
706
689
} ;
Original file line number Diff line number Diff line change @@ -334,14 +334,6 @@ class Vector2 {
334
334
isPositive ( ) {
335
335
return ( this . x >= 0 && this . y >= 0 ) ? true : false ;
336
336
}
337
- setFromArray ( array , offset ) {
338
- if ( offset === undefined ) {
339
- offset = 0 ;
340
- }
341
- this . x = array [ offset ] ;
342
- this . y = array [ offset + 1 ] ;
343
- return this ;
344
- }
345
337
toArray ( ) {
346
338
return [ this . x , this . y ] ;
347
339
}
@@ -702,15 +694,6 @@ class Vector3 {
702
694
isPositive ( ) {
703
695
return ( this . x >= 0 && this . y >= 0 && this . z >= 0 ) ? true : false ;
704
696
}
705
- setFromArray ( array , offset ) {
706
- if ( offset === undefined ) {
707
- offset = 0 ;
708
- }
709
- this . x = array [ offset ] ;
710
- this . y = array [ offset + 1 ] ;
711
- this . z = array [ offset + 2 ] ;
712
- return this ;
713
- }
714
697
toArray ( ) {
715
698
return [ this . x , this . y , this . z ] ;
716
699
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @lcluber/type6js" ,
3
- "version" : " 2.0.1 " ,
3
+ "version" : " 2.1.0 " ,
4
4
"description" : " Mathematics library for Javascript" ,
5
5
"keywords" : [
6
6
" maths" ,
Original file line number Diff line number Diff line change @@ -26,15 +26,6 @@ export class Vector2 {
26
26
return ( this . x >= 0 && this . y >= 0 ) ? true : false ;
27
27
}
28
28
29
- public setFromArray ( array : number [ ] , offset ?: number ) : Vector2 {
30
- if ( offset === undefined ) {
31
- offset = 0 ;
32
- }
33
- this . x = array [ offset ] ;
34
- this . y = array [ offset + 1 ] ;
35
- return this ;
36
- }
37
-
38
29
public toArray ( ) : number [ ] {
39
30
return [ this . x , this . y ] ;
40
31
}
Original file line number Diff line number Diff line change 1
1
2
- export interface Vector3 {
3
- [ key : string ] : any ;
4
- }
2
+ // export interface Vector3 {
3
+ // [key: string]: any;
4
+ // }
5
5
6
6
export class Vector3 {
7
7
public x : number ;
@@ -23,16 +23,6 @@ export class Vector3 {
23
23
return ( this . x >= 0 && this . y >= 0 && this . z >= 0 ) ? true : false ;
24
24
}
25
25
26
- public setFromArray ( array : number [ ] , offset ?: number ) : Vector3 {
27
- if ( offset === undefined ) {
28
- offset = 0 ;
29
- }
30
- this . x = array [ offset ] ;
31
- this . y = array [ offset + 1 ] ;
32
- this . z = array [ offset + 2 ] ;
33
- return this ;
34
- }
35
-
36
26
public toArray ( ) : number [ ] {
37
27
return [ this . x , this . y , this . z ] ;
38
28
}
You can’t perform that action at this time.
0 commit comments