You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by er...@apache.org on 2018/02/01 14:09:05 UTC
[13/14] commons-numbers git commit: Unnecessary use of accessors.
Unnecessary use of accessors.
Project: http://git-wip-us.apache.org/repos/asf/commons-numbers/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-numbers/commit/a4bee700
Tree: http://git-wip-us.apache.org/repos/asf/commons-numbers/tree/a4bee700
Diff: http://git-wip-us.apache.org/repos/asf/commons-numbers/diff/a4bee700
Branch: refs/heads/master
Commit: a4bee7004200d68afe8c6831b3eced555d98d8da
Parents: 5de033d
Author: Gilles Sadowski <gi...@harfang.homelinux.org>
Authored: Thu Feb 1 13:24:34 2018 +0100
Committer: Gilles Sadowski <gi...@harfang.homelinux.org>
Committed: Thu Feb 1 13:24:34 2018 +0100
----------------------------------------------------------------------
.../org/apache/commons/numbers/complex/Complex.java | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-numbers/blob/a4bee700/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/Complex.java
----------------------------------------------------------------------
diff --git a/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/Complex.java b/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/Complex.java
index 6e52674..53e3ff1 100644
--- a/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/Complex.java
+++ b/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/Complex.java
@@ -222,8 +222,8 @@ public class Complex implements Serializable {
*/
public Complex add(Complex addend) {
checkNotNull(addend);
- return new Complex(real + addend.getReal(),
- imaginary + addend.getImaginary());
+ return new Complex(real + addend.real,
+ imaginary + addend.imaginary);
}
/**
@@ -299,8 +299,8 @@ public class Complex implements Serializable {
public Complex divide(Complex divisor) {
checkNotNull(divisor);
- final double c = divisor.getReal();
- final double d = divisor.getImaginary();
+ final double c = divisor.real;
+ final double d = divisor.imaginary;
if (c == 0 &&
d == 0) {
return NaN;
@@ -624,8 +624,8 @@ public class Complex implements Serializable {
*/
public Complex subtract(Complex subtrahend) {
checkNotNull(subtrahend);
- return new Complex(real - subtrahend.getReal(),
- imaginary - subtrahend.getImaginary());
+ return new Complex(real - subtrahend.real,
+ imaginary - subtrahend.imaginary);
}
/**
@@ -1209,7 +1209,7 @@ public class Complex implements Serializable {
* @return the argument of {@code this}.
*/
public double getArgument() {
- return Math.atan2(getImaginary(), getReal());
+ return Math.atan2(imaginary, real);
}
/**