Skip to content

Commit 8144ddc

Browse files
committed
Refactored to fix bug caused by selfAssignment of variables in VectorCrossproduct class
1 parent 28c62d3 commit 8144ddc

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/main/java/com/thealgorithms/maths/VectorCrossProduct.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ public class VectorCrossProduct {
5555
/**
5656
* constructor, initialises Vector with given Direction Ratios
5757
*
58-
* @param x set to x
59-
* @param y set to y
60-
* @param z set to z
58+
* @param vectorX set to x
59+
* @param vectorY set to y
60+
* @param vectorZ set to z
6161
*/
62-
VectorCrossProduct(int x, int y, int z) {
63-
x = x;
64-
y = y;
65-
z = z;
62+
VectorCrossProduct(int vectorX, int vectorY, int vectorZ) {
63+
x = vectorX;
64+
y = vectorY;
65+
z = vectorZ;
6666
}
6767

6868
/**

0 commit comments

Comments
 (0)