summaryrefslogtreecommitdiff
path: root/src/main/java/sevenUnitsGUI/StandardDisplayRules.java
diff options
context:
space:
mode:
authorAdrien Hopkins <ahopk127@my.yorku.ca>2022-04-16 15:57:00 -0500
committerAdrien Hopkins <ahopk127@my.yorku.ca>2022-04-16 15:57:00 -0500
commit4aaf6a8b60fbec63c2e0bee624b3859ded0ecde3 (patch)
tree7499f304f4c849ded2f9035cb64f87a8cf85e608 /src/main/java/sevenUnitsGUI/StandardDisplayRules.java
parent4ad68a29f84538d3fb19eec8e0622731f5a5d7c8 (diff)
Added a full suite of frontend tests
(Added tests for the settings and unit/prefix viewer parts of the GUI, which are not yet implemented)
Diffstat (limited to 'src/main/java/sevenUnitsGUI/StandardDisplayRules.java')
-rw-r--r--src/main/java/sevenUnitsGUI/StandardDisplayRules.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/main/java/sevenUnitsGUI/StandardDisplayRules.java b/src/main/java/sevenUnitsGUI/StandardDisplayRules.java
index 331f598..f6272c8 100644
--- a/src/main/java/sevenUnitsGUI/StandardDisplayRules.java
+++ b/src/main/java/sevenUnitsGUI/StandardDisplayRules.java
@@ -45,6 +45,32 @@ final class StandardDisplayRules {
};
/**
+ * Gets a display rule that rounds numbers to a fixed number of decimal
+ * places.
+ *
+ * @param decimalPlaces number of decimal places
+ * @return display rule
+ * @since 2022-04-16
+ */
+ public static final Function<UncertainDouble, String> getFixedPlacesRule(
+ int decimalPlaces) {
+ throw new UnsupportedOperationException("Not implemented yet");
+ }
+
+ /**
+ * Gets a display rule that rounds numbers to a fixed number of significant
+ * figures.
+ *
+ * @param significantFigures number of significant figures
+ * @return display rule
+ * @since 2022-04-16
+ */
+ public static final Function<UncertainDouble, String> getFixedPrecisionRule(
+ int significantFigures) {
+ throw new UnsupportedOperationException("Not implemented yet");
+ }
+
+ /**
* @return a rule that rounds using UncertainDouble's own toString(false)
* function.
* @since 2021-12-24