From 5a57544067f1cdc15bcdcc675cf2feaefbb63bc4 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Tue, 8 Aug 2017 11:27:59 -0700 Subject: [PATCH] Add a plugin registration function to Plugins. --- .../java/org/nwapw/abacus/plugin/StandardPlugin.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/nwapw/abacus/plugin/StandardPlugin.java b/src/main/java/org/nwapw/abacus/plugin/StandardPlugin.java index 4d8aea2..08e849f 100755 --- a/src/main/java/org/nwapw/abacus/plugin/StandardPlugin.java +++ b/src/main/java/org/nwapw/abacus/plugin/StandardPlugin.java @@ -1,9 +1,6 @@ package org.nwapw.abacus.plugin; -import org.nwapw.abacus.function.Function; -import org.nwapw.abacus.function.Operator; -import org.nwapw.abacus.function.OperatorAssociativity; -import org.nwapw.abacus.function.OperatorType; +import org.nwapw.abacus.function.*; import org.nwapw.abacus.number.NaiveNumber; import org.nwapw.abacus.number.NumberInterface; import org.nwapw.abacus.number.PreciseNumber; @@ -583,6 +580,10 @@ public class StandardPlugin extends Plugin { registerFunction("sec", functionSec); registerFunction("csc", functionCsc); registerFunction("cot", functionCot); + + registerDocumentation(new Documentation("abs", "Absolute Value", "Finds the distance " + + "from zero of a number.", "Given a number, this function finds the distance form " + + "zero of a number, effectively turning negative numbers into positive ones.", DocumentationType.FUNCTION)); } @Override