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/12/01 00:15:05 UTC
commons-numbers git commit: NUMBERS-74: Convert new Fraction factory
methods to static
Repository: commons-numbers
Updated Branches:
refs/heads/fraction-dev ac4d27549 -> f6c81a5db
NUMBERS-74: Convert new Fraction factory methods to static
Project: http://git-wip-us.apache.org/repos/asf/commons-numbers/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-numbers/commit/f6c81a5d
Tree: http://git-wip-us.apache.org/repos/asf/commons-numbers/tree/f6c81a5d
Diff: http://git-wip-us.apache.org/repos/asf/commons-numbers/diff/f6c81a5d
Branch: refs/heads/fraction-dev
Commit: f6c81a5db078d45b24d3d8e50c9d6c27d2c86b37
Parents: ac4d275
Author: Eric Barnhill <er...@protonmail.ch>
Authored: Fri Nov 30 16:14:47 2018 -0800
Committer: Eric Barnhill <er...@protonmail.ch>
Committed: Fri Nov 30 16:14:47 2018 -0800
----------------------------------------------------------------------
.../java/org/apache/commons/numbers/fraction/Fraction.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-numbers/blob/f6c81a5d/commons-numbers-fraction/src/main/java/org/apache/commons/numbers/fraction/Fraction.java
----------------------------------------------------------------------
diff --git a/commons-numbers-fraction/src/main/java/org/apache/commons/numbers/fraction/Fraction.java b/commons-numbers-fraction/src/main/java/org/apache/commons/numbers/fraction/Fraction.java
index aeb5030..ea063b6 100644
--- a/commons-numbers-fraction/src/main/java/org/apache/commons/numbers/fraction/Fraction.java
+++ b/commons-numbers-fraction/src/main/java/org/apache/commons/numbers/fraction/Fraction.java
@@ -57,7 +57,7 @@ public class Fraction
* @throws IllegalArgumentException if the continued fraction failed to
* converge.
*/
- public Fraction ofDouble(double value) {
+ public static Fraction ofDouble(double value) {
return ofDouble(value, DEFAULT_EPSILON, 100);
}
@@ -77,7 +77,7 @@ public class Fraction
* @throws IllegalArgumentException if the continued fraction failed to
* converge.
*/
- public Fraction ofDouble(double value, double epsilon, int maxIterations)
+ public static Fraction ofDouble(double value, double epsilon, int maxIterations)
{
return new Fraction(value, epsilon, Integer.MAX_VALUE, maxIterations);
}
@@ -96,7 +96,7 @@ public class Fraction
* @throws IllegalArgumentException if the continued fraction failed to
* converge
*/
- public Fraction ofDouble(double value, int maxDenominator)
+ public static Fraction ofDouble(double value, int maxDenominator)
{
return new Fraction(value, 0, maxDenominator, 100);
}