Skip to content

Commit e2fc505

Browse files
committed
fix Rectangle and Circle classes
1 parent 5d7f1fd commit e2fc505

File tree

9 files changed

+23
-19
lines changed

9 files changed

+23
-19
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
Version 3.0.0-beta.3 (May 15th 2021)
1+
Version 3.0.0-beta.4 (May 15th 2021)
2+
-----------------------------
3+
* fix Rectangle and Circle classes
4+
5+
Version 3.0.0-beta.3 (May 14th 2021)
26
-----------------------------
37
* setFromScalar(), setFromArray(), setFromRadian() and setFromDegree() methods from Vector2 class becomes setScalar(), setArray(), setRadian() and setDegree()
48
* setFromScalar(), setFromArray() methods from Vector3 class becomes setScalar(), setArray()

dist/type6.cjs.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ class Circle {
644644
return this;
645645
}
646646
setPosition(positionX, positionY) {
647-
this.position.setFromScalar(positionX, positionY);
647+
this.position.setScalar(positionX, positionY);
648648
return this;
649649
}
650650
setRadius(radius) {
@@ -697,11 +697,11 @@ class Rectangle {
697697
return this;
698698
}
699699
setPosition(positionX, positionY) {
700-
this.position.setFromScalar(positionX, positionY);
700+
this.position.setScalar(positionX, positionY);
701701
this.setCorners();
702702
}
703703
setSize(width, height) {
704-
this.size.setFromScalar(width, height);
704+
this.size.setScalar(width, height);
705705
this.setHalfSize();
706706
this.setCorners();
707707
}
@@ -737,7 +737,7 @@ class Vector3 extends Vector {
737737
this.x = 0.0;
738738
this.y = 0.0;
739739
this.z = 0.0;
740-
this.setFromScalar(x, y, z);
740+
this.setScalar(x, y, z);
741741
}
742742
clone() {
743743
return new Vector3(this.x, this.y, this.z);

dist/type6.iife.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,7 @@ var Type6 = (function (exports) {
960960
}, {
961961
key: "setPosition",
962962
value: function setPosition(positionX, positionY) {
963-
this.position.setFromScalar(positionX, positionY);
963+
this.position.setScalar(positionX, positionY);
964964
return this;
965965
}
966966
}, {
@@ -1037,13 +1037,13 @@ var Type6 = (function (exports) {
10371037
}, {
10381038
key: "setPosition",
10391039
value: function setPosition(positionX, positionY) {
1040-
this.position.setFromScalar(positionX, positionY);
1040+
this.position.setScalar(positionX, positionY);
10411041
this.setCorners();
10421042
}
10431043
}, {
10441044
key: "setSize",
10451045
value: function setSize(width, height) {
1046-
this.size.setFromScalar(width, height);
1046+
this.size.setScalar(width, height);
10471047
this.setHalfSize();
10481048
this.setCorners();
10491049
}
@@ -1100,7 +1100,7 @@ var Type6 = (function (exports) {
11001100
_this.y = 0.0;
11011101
_this.z = 0.0;
11021102

1103-
_this.setFromScalar(x, y, z);
1103+
_this.setScalar(x, y, z);
11041104

11051105
return _this;
11061106
}

dist/type6.iife.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/type6.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ class Circle {
640640
return this;
641641
}
642642
setPosition(positionX, positionY) {
643-
this.position.setFromScalar(positionX, positionY);
643+
this.position.setScalar(positionX, positionY);
644644
return this;
645645
}
646646
setRadius(radius) {
@@ -693,11 +693,11 @@ class Rectangle {
693693
return this;
694694
}
695695
setPosition(positionX, positionY) {
696-
this.position.setFromScalar(positionX, positionY);
696+
this.position.setScalar(positionX, positionY);
697697
this.setCorners();
698698
}
699699
setSize(width, height) {
700-
this.size.setFromScalar(width, height);
700+
this.size.setScalar(width, height);
701701
this.setHalfSize();
702702
this.setCorners();
703703
}
@@ -733,7 +733,7 @@ class Vector3 extends Vector {
733733
this.x = 0.0;
734734
this.y = 0.0;
735735
this.z = 0.0;
736-
this.setFromScalar(x, y, z);
736+
this.setScalar(x, y, z);
737737
}
738738
clone() {
739739
return new Vector3(this.x, this.y, this.z);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lcluber/type6js",
3-
"version": "3.0.0-beta.3",
3+
"version": "3.0.0-beta.4",
44
"description": "Mathematics library for Javascript",
55
"keywords": [
66
"maths",

src/geometry/circle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export class Circle {
4444
}
4545

4646
public setPosition( positionX: number, positionY: number ) {
47-
this.position.setFromScalar(positionX, positionY);
47+
this.position.setScalar(positionX, positionY);
4848
return this;
4949
}
5050

src/geometry/rectangle.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ export class Rectangle {
3232
}
3333

3434
public setPosition(positionX: number, positionY: number): void {
35-
this.position.setFromScalar( positionX, positionY );
35+
this.position.setScalar( positionX, positionY );
3636
this.setCorners();
3737
}
3838

3939
public setSize(width: number, height: number): void {
40-
this.size.setFromScalar(width, height);
40+
this.size.setScalar(width, height);
4141
this.setHalfSize();
4242
this.setCorners();
4343
}

src/vectors/vector3.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export class Vector3 extends Vector {
77

88
constructor(x?: number, y?: number, z?: number) {
99
super();
10-
this.setFromScalar(x, y, z);
10+
this.setScalar(x, y, z);
1111
}
1212

1313
public clone(): Vector3 {

0 commit comments

Comments
 (0)