diff --git a/src/StandardLibrary/Functions/Angle/Degrees.cs b/src/StandardLibrary/Functions/Angle/Degrees.cs
index 4535a9c..4a4f9f9 100644
--- a/src/StandardLibrary/Functions/Angle/Degrees.cs
+++ b/src/StandardLibrary/Functions/Angle/Degrees.cs
@@ -1,8 +1,18 @@
namespace CSMic.StandardLibrary.Functions.Angle
{
+ ///
+ /// Represents the standard-library degrees function.
+ ///
+ ///
+ /// The degrees function evaluates a numeric expression in radians and returns the equivalent angle in degrees.
+ ///
public class Degrees : FunctionBase, ICodedFunction
{
+ ///
+ /// Gets the expression-language name used to invoke this function.
+ ///
+ /// degrees.
public string Name
{
get
@@ -11,6 +21,10 @@
}
}
+ ///
+ /// Gets the argument signature expected by the degrees function.
+ ///
+ /// A single numeric argument named value.
public override IEnumerable ExpectedArguments
{
get
@@ -19,6 +33,15 @@
}
}
+ ///
+ /// Executes the degrees function.
+ ///
+ ///
+ /// The evaluated arguments supplied to the function. Exactly one numeric argument is expected.
+ ///
+ ///
+ /// A numeric containing the input angle converted to degrees.
+ ///
public FunctionValue Execute(params FunctionArgument[] args)
{
return Execute(args, (_args) =>
diff --git a/src/StandardLibrary/Functions/Angle/Radians.cs b/src/StandardLibrary/Functions/Angle/Radians.cs
index 9df8aa2..f6dd61c 100644
--- a/src/StandardLibrary/Functions/Angle/Radians.cs
+++ b/src/StandardLibrary/Functions/Angle/Radians.cs
@@ -1,8 +1,18 @@
namespace CSMic.StandardLibrary.Functions.Angle
{
+ ///
+ /// Represents the standard-library radians function.
+ ///
+ ///
+ /// The radians function evaluates a numeric expression in degrees and returns the equivalent angle in radians.
+ ///
public class Radians : FunctionBase, ICodedFunction
{
+ ///
+ /// Gets the expression-language name used to invoke this function.
+ ///
+ /// radians.
public string Name
{
get
@@ -11,6 +21,10 @@
}
}
+ ///
+ /// Gets the argument signature expected by the radians function.
+ ///
+ /// A single numeric argument named value.
public override IEnumerable ExpectedArguments
{
get
@@ -19,6 +33,15 @@
}
}
+ ///
+ /// Executes the radians function.
+ ///
+ ///
+ /// The evaluated arguments supplied to the function. Exactly one numeric argument is expected.
+ ///
+ ///
+ /// A numeric containing the input angle converted to radians.
+ ///
public FunctionValue Execute(params FunctionArgument[] args)
{
return Execute(args, (_args) =>
diff --git a/src/StandardLibrary/Functions/Angle/WrapAngle.cs b/src/StandardLibrary/Functions/Angle/WrapAngle.cs
index d1511bb..ae6b4a9 100644
--- a/src/StandardLibrary/Functions/Angle/WrapAngle.cs
+++ b/src/StandardLibrary/Functions/Angle/WrapAngle.cs
@@ -1,7 +1,17 @@
namespace CSMic.StandardLibrary.Functions.Angle
{
+ ///
+ /// Represents the standard-library wrapangle function.
+ ///
+ ///
+ /// The wrapangle function evaluates a numeric value and wraps it into the requested period.
+ ///
public class WrapAngle : FunctionBase, ICodedFunction
{
+ ///
+ /// Gets the expression-language name used to invoke this function.
+ ///
+ /// wrapangle.
public string Name
{
get
@@ -10,6 +20,12 @@
}
}
+ ///
+ /// Gets the argument signature expected by the wrapangle function.
+ ///
+ ///
+ /// Three numeric arguments named value, periodStart, and periodEnd.
+ ///
public override IEnumerable ExpectedArguments
{
get
@@ -20,6 +36,15 @@
}
}
+ ///
+ /// Executes the wrapangle function.
+ ///
+ ///
+ /// The evaluated arguments supplied to the function. Exactly three numeric arguments are expected.
+ ///
+ ///
+ /// A numeric containing the wrapped value within the supplied period.
+ ///
public FunctionValue Execute(params FunctionArgument[] args)
{
return Execute(args, (_args) =>
diff --git a/src/StandardLibrary/Functions/NumberTheory/BinomialCoefficient.cs b/src/StandardLibrary/Functions/NumberTheory/BinomialCoefficient.cs
index d4f1f57..b376cf9 100644
--- a/src/StandardLibrary/Functions/NumberTheory/BinomialCoefficient.cs
+++ b/src/StandardLibrary/Functions/NumberTheory/BinomialCoefficient.cs
@@ -7,8 +7,18 @@ using System.Threading.Tasks;
namespace CSMic.StandardLibrary.Functions.NumberTheory
{
+ ///
+ /// Represents the standard-library ncr function.
+ ///
+ ///
+ /// The ncr function evaluates two non-negative integers and returns the number of combinations.
+ ///
public class BinomialCoefficient : FunctionBase, ICodedFunction
{
+ ///
+ /// Gets the expression-language name used to invoke this function.
+ ///
+ /// ncr.
public string Name
{
get
@@ -17,6 +27,10 @@ namespace CSMic.StandardLibrary.Functions.NumberTheory
}
}
+ ///
+ /// Gets the argument signature expected by the ncr function.
+ ///
+ /// Two numeric arguments named first and second.
public override IEnumerable ExpectedArguments
{
get
@@ -26,6 +40,15 @@ namespace CSMic.StandardLibrary.Functions.NumberTheory
}
}
+ ///
+ /// Executes the ncr function.
+ ///
+ ///
+ /// The evaluated arguments supplied to the function. Exactly two numeric arguments are expected.
+ ///
+ ///
+ /// A numeric containing the number of combinations for the supplied values.
+ ///
public FunctionValue Execute(params FunctionArgument[] args)
{
return base.Execute(args, (_args) =>
diff --git a/src/StandardLibrary/Functions/NumberTheory/Factorial.cs b/src/StandardLibrary/Functions/NumberTheory/Factorial.cs
index a8771a3..fe6e245 100644
--- a/src/StandardLibrary/Functions/NumberTheory/Factorial.cs
+++ b/src/StandardLibrary/Functions/NumberTheory/Factorial.cs
@@ -7,6 +7,13 @@ using System.Threading.Tasks;
namespace CSMic.StandardLibrary.Functions.NumberTheory
{
+ ///
+ /// Represents the standard-library fac function.
+ ///
+ ///
+ /// The fac function evaluates a numeric expression and returns its factorial when the value is an integer,
+ /// or its gamma-based extension when the value is non-integer.
+ ///
public class Factorial : FunctionBase, ICodedFunction
{
private static readonly double[] LANCZOS_APPROXIMATION =
@@ -22,6 +29,9 @@ namespace CSMic.StandardLibrary.Functions.NumberTheory
1.5056327351493116e-7
};
+ ///
+ /// Gets the lookup table used for exact factorial values from 0 through 20.
+ ///
public static readonly decimal[] INTEGER_FACTORIAL_LOOKUP =
{
/* 0 */ 1,
@@ -47,6 +57,10 @@ namespace CSMic.StandardLibrary.Functions.NumberTheory
/* 20 */ 2432902008176640000
};
+ ///
+ /// Gets the expression-language name used to invoke this function.
+ ///
+ /// fac.
public string Name
{
get
@@ -55,6 +69,10 @@ namespace CSMic.StandardLibrary.Functions.NumberTheory
}
}
+ ///
+ /// Gets the argument signature expected by the fac function.
+ ///
+ /// A single numeric argument named value.
public override IEnumerable ExpectedArguments
{
get
@@ -63,6 +81,15 @@ namespace CSMic.StandardLibrary.Functions.NumberTheory
}
}
+ ///
+ /// Executes the fac function.
+ ///
+ ///
+ /// The evaluated arguments supplied to the function. Exactly one numeric argument is expected.
+ ///
+ ///
+ /// A numeric containing the factorial result or a gamma-based approximation.
+ ///
public FunctionValue Execute(params FunctionArgument[] args)
{
return base.Execute(args, (_args) =>
@@ -92,6 +119,11 @@ namespace CSMic.StandardLibrary.Functions.NumberTheory
});
}
+ ///
+ /// Evaluates the gamma function used to extend factorial values to non-integer inputs.
+ ///
+ /// The shifted input value.
+ /// The gamma of the supplied value.
private static double Gamma(double shiftedGama)
{
if (shiftedGama < 0.5)
diff --git a/src/StandardLibrary/Functions/NumberTheory/GreatedCommonDenomitator.cs b/src/StandardLibrary/Functions/NumberTheory/GreatedCommonDenomitator.cs
index 5940865..234022d 100644
--- a/src/StandardLibrary/Functions/NumberTheory/GreatedCommonDenomitator.cs
+++ b/src/StandardLibrary/Functions/NumberTheory/GreatedCommonDenomitator.cs
@@ -7,8 +7,18 @@ using System.Threading.Tasks;
namespace CSMic.StandardLibrary.Functions.NumberTheory
{
+ ///
+ /// Represents the standard-library gcd function.
+ ///
+ ///
+ /// The gcd function evaluates two positive integers and returns their greatest common divisor.
+ ///
public class GreatestCommonDivisor : FunctionBase, ICodedFunction
{
+ ///
+ /// Gets the expression-language name used to invoke this function.
+ ///
+ /// gcd.
public string Name
{
get
@@ -17,6 +27,10 @@ namespace CSMic.StandardLibrary.Functions.NumberTheory
}
}
+ ///
+ /// Gets the argument signature expected by the gcd function.
+ ///
+ /// Two numeric arguments named first and second.
public override IEnumerable ExpectedArguments
{
get
@@ -26,6 +40,15 @@ namespace CSMic.StandardLibrary.Functions.NumberTheory
}
}
+ ///
+ /// Executes the gcd function.
+ ///
+ ///
+ /// The evaluated arguments supplied to the function. Exactly two numeric arguments are expected.
+ ///
+ ///
+ /// A numeric containing the greatest common divisor of the two input values.
+ ///
public FunctionValue Execute(params FunctionArgument[] args)
{
return base.Execute(args, (_args) =>
@@ -51,6 +74,12 @@ namespace CSMic.StandardLibrary.Functions.NumberTheory
});
}
+ ///
+ /// Computes the greatest common divisor using the Euclidean algorithm.
+ ///
+ /// The first value.
+ /// The second value.
+ /// The greatest common divisor of the supplied values.
public decimal EuclideanAlgorithm(decimal first, decimal second)
{
if(second == 0)
diff --git a/src/StandardLibrary/Functions/NumberTheory/LeastCommonMultiple.cs b/src/StandardLibrary/Functions/NumberTheory/LeastCommonMultiple.cs
index 7a93993..0b55429 100644
--- a/src/StandardLibrary/Functions/NumberTheory/LeastCommonMultiple.cs
+++ b/src/StandardLibrary/Functions/NumberTheory/LeastCommonMultiple.cs
@@ -7,8 +7,18 @@ using System.Threading.Tasks;
namespace CSMic.StandardLibrary.Functions.NumberTheory
{
+ ///
+ /// Represents the standard-library lcm function.
+ ///
+ ///
+ /// The lcm function evaluates two positive integers and returns their least common multiple.
+ ///
public class LeastCommonMultiple : FunctionBase, ICodedFunction
{
+ ///
+ /// Gets the expression-language name used to invoke this function.
+ ///
+ /// lcm.
public string Name
{
get
@@ -17,6 +27,10 @@ namespace CSMic.StandardLibrary.Functions.NumberTheory
}
}
+ ///
+ /// Gets the argument signature expected by the lcm function.
+ ///
+ /// Two numeric arguments named first and second.
public override IEnumerable ExpectedArguments
{
get
@@ -26,6 +40,15 @@ namespace CSMic.StandardLibrary.Functions.NumberTheory
}
}
+ ///
+ /// Executes the lcm function.
+ ///
+ ///
+ /// The evaluated arguments supplied to the function. Exactly two numeric arguments are expected.
+ ///
+ ///
+ /// A numeric containing the least common multiple of the two input values.
+ ///
public FunctionValue Execute(params FunctionArgument[] args)
{
return base.Execute(args, (_args) =>
@@ -52,6 +75,12 @@ namespace CSMic.StandardLibrary.Functions.NumberTheory
});
}
+ ///
+ /// Computes the greatest common divisor used when deriving the least common multiple.
+ ///
+ /// The first value.
+ /// The second value.
+ /// The greatest common divisor of the supplied values.
public decimal EuclideanAlgorithm(decimal first, decimal second)
{
if(second == 0)
diff --git a/src/StandardLibrary/Functions/NumberTheory/Permutations.cs b/src/StandardLibrary/Functions/NumberTheory/Permutations.cs
index 20a4144..6dcc42f 100644
--- a/src/StandardLibrary/Functions/NumberTheory/Permutations.cs
+++ b/src/StandardLibrary/Functions/NumberTheory/Permutations.cs
@@ -7,8 +7,18 @@ using System.Threading.Tasks;
namespace CSMic.StandardLibrary.Functions.NumberTheory
{
+ ///
+ /// Represents the standard-library npr function.
+ ///
+ ///
+ /// The npr function evaluates two non-negative integers and returns the number of permutations.
+ ///
public class Permutations : FunctionBase, ICodedFunction
{
+ ///
+ /// Gets the expression-language name used to invoke this function.
+ ///
+ /// npr.
public string Name
{
get
@@ -17,6 +27,10 @@ namespace CSMic.StandardLibrary.Functions.NumberTheory
}
}
+ ///
+ /// Gets the argument signature expected by the npr function.
+ ///
+ /// Two numeric arguments named first and second.
public override IEnumerable ExpectedArguments
{
get
@@ -26,6 +40,15 @@ namespace CSMic.StandardLibrary.Functions.NumberTheory
}
}
+ ///
+ /// Executes the npr function.
+ ///
+ ///
+ /// The evaluated arguments supplied to the function. Exactly two numeric arguments are expected.
+ ///
+ ///
+ /// A numeric containing the number of permutations for the supplied values.
+ ///
public FunctionValue Execute(params FunctionArgument[] args)
{
return base.Execute(args, (_args) =>
diff --git a/src/StandardLibrary/Functions/Random/Bernoulli.cs b/src/StandardLibrary/Functions/Random/Bernoulli.cs
index dd7261e..7cd7e33 100644
--- a/src/StandardLibrary/Functions/Random/Bernoulli.cs
+++ b/src/StandardLibrary/Functions/Random/Bernoulli.cs
@@ -3,8 +3,18 @@ using CSMic.StandardLibrary.Functions.Random;
namespace CSMic.StandardLibrary.Functions.Random
{
+ ///
+ /// Represents the standard-library bern function.
+ ///
+ ///
+ /// The bern function evaluates a probability and returns a boolean result using a Bernoulli trial.
+ ///
public class Bernoulli : RandomBase, ICodedFunction
{
+ ///
+ /// Gets the expression-language name used to invoke this function.
+ ///
+ /// bern.
public string Name
{
get
@@ -13,6 +23,10 @@ namespace CSMic.StandardLibrary.Functions.Random
}
}
+ ///
+ /// Gets the argument signature expected by the bern function.
+ ///
+ /// A single numeric argument named p.
public override IEnumerable ExpectedArguments
{
get
@@ -21,6 +35,15 @@ namespace CSMic.StandardLibrary.Functions.Random
}
}
+ ///
+ /// Executes the bern function.
+ ///
+ ///
+ /// The evaluated arguments supplied to the function. Exactly one numeric argument is expected.
+ ///
+ ///
+ /// A boolean containing true when the Bernoulli trial succeeds; otherwise false.
+ ///
public FunctionValue Execute(params FunctionArgument[] args)
{
return base.Execute(args, (_args) =>
diff --git a/src/StandardLibrary/Functions/Random/FairFlip.cs b/src/StandardLibrary/Functions/Random/FairFlip.cs
index 32e6382..a3e6330 100644
--- a/src/StandardLibrary/Functions/Random/FairFlip.cs
+++ b/src/StandardLibrary/Functions/Random/FairFlip.cs
@@ -3,8 +3,18 @@ using CSMic.StandardLibrary.Functions.Random;
namespace CSMic.StandardLibrary.Functions.Random
{
+ ///
+ /// Represents the standard-library flip function.
+ ///
+ ///
+ /// The flip function returns a fair boolean result from a 50/50 random trial.
+ ///
public class FairFlip : RandomBase, ICodedFunction
{
+ ///
+ /// Gets the expression-language name used to invoke this function.
+ ///
+ /// flip.
public string Name
{
get
@@ -13,6 +23,10 @@ namespace CSMic.StandardLibrary.Functions.Random
}
}
+ ///
+ /// Gets the argument signature expected by the flip function.
+ ///
+ /// This function takes no arguments.
public override IEnumerable ExpectedArguments
{
get
@@ -21,6 +35,15 @@ namespace CSMic.StandardLibrary.Functions.Random
}
}
+ ///
+ /// Executes the flip function.
+ ///
+ ///
+ /// The evaluated arguments supplied to the function. No arguments are expected.
+ ///
+ ///
+ /// A boolean containing true or false with equal probability.
+ ///
public FunctionValue Execute(params FunctionArgument[] args)
{
return base.Execute(args, (_args) =>
diff --git a/src/StandardLibrary/Functions/Random/RandomBase.cs b/src/StandardLibrary/Functions/Random/RandomBase.cs
index 36edced..ab6f278 100644
--- a/src/StandardLibrary/Functions/Random/RandomBase.cs
+++ b/src/StandardLibrary/Functions/Random/RandomBase.cs
@@ -6,19 +6,31 @@ using System.Threading.Tasks;
namespace CSMic.StandardLibrary.Functions.Random
{
+ ///
+ /// Provides shared random-number helpers for the standard-library random functions.
+ ///
public abstract class RandomBase : FunctionBase
{
// Provide a thread-local random to approximate Random.Shared in .NET Standard
private static readonly System.Threading.ThreadLocal s_threadLocalRandom =
new System.Threading.ThreadLocal(() => new System.Random());
+ ///
+ /// Gets the thread-local random number generator used by the random functions.
+ ///
protected static System.Random RandomNumberGenerator => s_threadLocalRandom.Value!;
+ ///
+ /// Returns a pseudo-random decimal in the half-open interval [0, 1).
+ ///
protected static decimal NextDecimal()
{
return Convert.ToDecimal(RandomNumberGenerator.NextDouble());
}
+ ///
+ /// Returns a pseudo-random decimal sampled from a normal distribution centered at zero.
+ ///
protected static decimal NextDecimalNormal()
{
double u1 = 1.0 - RandomNumberGenerator.NextDouble();
diff --git a/src/StandardLibrary/Functions/Random/RandomNormal.cs b/src/StandardLibrary/Functions/Random/RandomNormal.cs
index fa8f6a1..b4c8650 100644
--- a/src/StandardLibrary/Functions/Random/RandomNormal.cs
+++ b/src/StandardLibrary/Functions/Random/RandomNormal.cs
@@ -3,8 +3,18 @@ using CSMic.StandardLibrary.Functions.Random;
namespace CSMic.StandardLibrary.Functions.Random
{
+ ///
+ /// Represents the standard-library randn function.
+ ///
+ ///
+ /// The randn function returns a pseudo-random decimal sampled from a normal distribution.
+ ///
public class RandomNormal : RandomBase, ICodedFunction
{
+ ///
+ /// Gets the expression-language name used to invoke this function.
+ ///
+ /// randn.
public string Name
{
get
@@ -13,6 +23,10 @@ namespace CSMic.StandardLibrary.Functions.Random
}
}
+ ///
+ /// Gets the argument signature expected by the randn function.
+ ///
+ /// This function takes no arguments.
public override IEnumerable ExpectedArguments
{
get
@@ -21,6 +35,15 @@ namespace CSMic.StandardLibrary.Functions.Random
}
}
+ ///
+ /// Executes the randn function.
+ ///
+ ///
+ /// The evaluated arguments supplied to the function. No arguments are expected.
+ ///
+ ///
+ /// A numeric containing a pseudo-random decimal sampled from a normal distribution.
+ ///
public FunctionValue Execute(params FunctionArgument[] args)
{
return base.Execute(args, (_args) =>
diff --git a/src/StandardLibrary/Functions/Random/RandomNormalSpread.cs b/src/StandardLibrary/Functions/Random/RandomNormalSpread.cs
index 85897ae..13a0592 100644
--- a/src/StandardLibrary/Functions/Random/RandomNormalSpread.cs
+++ b/src/StandardLibrary/Functions/Random/RandomNormalSpread.cs
@@ -3,8 +3,18 @@ using CSMic.StandardLibrary.Functions.Random;
namespace CSMic.StandardLibrary.Functions.Random
{
+ ///
+ /// Represents the standard-library randns function.
+ ///
+ ///
+ /// The randns function evaluates two numeric bounds and returns a pseudo-random decimal derived from a normal distribution.
+ ///
public class RandomNormalSpread : RandomBase, ICodedFunction
{
+ ///
+ /// Gets the expression-language name used to invoke this function.
+ ///
+ /// randns.
public string Name
{
get
@@ -13,6 +23,10 @@ namespace CSMic.StandardLibrary.Functions.Random
}
}
+ ///
+ /// Gets the argument signature expected by the randns function.
+ ///
+ /// Two numeric arguments named lower and upper.
public override IEnumerable ExpectedArguments
{
get
@@ -22,6 +36,15 @@ namespace CSMic.StandardLibrary.Functions.Random
}
}
+ ///
+ /// Executes the randns function.
+ ///
+ ///
+ /// The evaluated arguments supplied to the function. Exactly two numeric arguments are expected.
+ ///
+ ///
+ /// A numeric containing a pseudo-random decimal derived from a normal distribution.
+ ///
public FunctionValue Execute(params FunctionArgument[] args)
{
return base.Execute(args, (_args) =>
diff --git a/src/StandardLibrary/Functions/Random/RandomUniform.cs b/src/StandardLibrary/Functions/Random/RandomUniform.cs
index cb388bb..cd511be 100644
--- a/src/StandardLibrary/Functions/Random/RandomUniform.cs
+++ b/src/StandardLibrary/Functions/Random/RandomUniform.cs
@@ -3,8 +3,18 @@ using CSMic.StandardLibrary.Functions.Random;
namespace CSMic.StandardLibrary.Functions.Random
{
+ ///
+ /// Represents the standard-library rand function.
+ ///
+ ///
+ /// The rand function returns a uniformly distributed pseudo-random decimal.
+ ///
public class RandomUniform : RandomBase, ICodedFunction
{
+ ///
+ /// Gets the expression-language name used to invoke this function.
+ ///
+ /// rand.
public string Name
{
get
@@ -13,6 +23,10 @@ namespace CSMic.StandardLibrary.Functions.Random
}
}
+ ///
+ /// Gets the argument signature expected by the rand function.
+ ///
+ /// This function takes no arguments.
public override IEnumerable ExpectedArguments
{
get
@@ -21,6 +35,15 @@ namespace CSMic.StandardLibrary.Functions.Random
}
}
+ ///
+ /// Executes the rand function.
+ ///
+ ///
+ /// The evaluated arguments supplied to the function. No arguments are expected.
+ ///
+ ///
+ /// A numeric containing a pseudo-random decimal in the half-open interval [0, 1).
+ ///
public FunctionValue Execute(params FunctionArgument[] args)
{
return base.Execute(args, (_args) =>
diff --git a/src/StandardLibrary/Functions/Random/RandomUniformSpread.cs b/src/StandardLibrary/Functions/Random/RandomUniformSpread.cs
index 97bddd0..fb31831 100644
--- a/src/StandardLibrary/Functions/Random/RandomUniformSpread.cs
+++ b/src/StandardLibrary/Functions/Random/RandomUniformSpread.cs
@@ -3,8 +3,18 @@ using CSMic.StandardLibrary.Functions.Random;
namespace CSMic.StandardLibrary.Functions.Random
{
+ ///
+ /// Represents the standard-library rands function.
+ ///
+ ///
+ /// The rands function evaluates two numeric bounds and returns a uniformly distributed pseudo-random decimal between them.
+ ///
public class RandomUniformSpread : RandomBase, ICodedFunction
{
+ ///
+ /// Gets the expression-language name used to invoke this function.
+ ///
+ /// rands.
public string Name
{
get
@@ -13,6 +23,10 @@ namespace CSMic.StandardLibrary.Functions.Random
}
}
+ ///
+ /// Gets the argument signature expected by the rands function.
+ ///
+ /// Two numeric arguments named lower and upper.
public override IEnumerable ExpectedArguments
{
get
@@ -22,6 +36,15 @@ namespace CSMic.StandardLibrary.Functions.Random
}
}
+ ///
+ /// Executes the rands function.
+ ///
+ ///
+ /// The evaluated arguments supplied to the function. Exactly two numeric arguments are expected.
+ ///
+ ///
+ /// A numeric containing a uniformly distributed pseudo-random decimal between the supplied bounds.
+ ///
public FunctionValue Execute(params FunctionArgument[] args)
{
return base.Execute(args, (_args) =>
diff --git a/src/StandardLibrary/Functions/Rounding/Ceiling.cs b/src/StandardLibrary/Functions/Rounding/Ceiling.cs
index 9881679..5e116ec 100644
--- a/src/StandardLibrary/Functions/Rounding/Ceiling.cs
+++ b/src/StandardLibrary/Functions/Rounding/Ceiling.cs
@@ -1,8 +1,18 @@
namespace CSMic.StandardLibrary.Functions.Rounding
{
+ ///
+ /// Represents the standard-library ceiling function.
+ ///
+ ///
+ /// The ceiling function evaluates a numeric value and rounds it toward positive infinity.
+ ///
public class Ceiling : FunctionBase, ICodedFunction
{
+ ///
+ /// Gets the expression-language name used to invoke this function.
+ ///
+ /// ceiling.
public string Name
{
get
@@ -11,6 +21,10 @@
}
}
+ ///
+ /// Gets the argument signature expected by the ceiling function.
+ ///
+ /// A single numeric argument named value.
public override IEnumerable ExpectedArguments
{
get
@@ -19,6 +33,15 @@
}
}
+ ///
+ /// Executes the ceiling function.
+ ///
+ ///
+ /// The evaluated arguments supplied to the function. Exactly one numeric argument is expected.
+ ///
+ ///
+ /// A numeric containing the smallest integer greater than or equal to the input.
+ ///
public FunctionValue Execute(params FunctionArgument[] args)
{
return Execute(args, (_args) =>
diff --git a/src/StandardLibrary/Functions/Rounding/Clamp.cs b/src/StandardLibrary/Functions/Rounding/Clamp.cs
index 71ba157..be509d6 100644
--- a/src/StandardLibrary/Functions/Rounding/Clamp.cs
+++ b/src/StandardLibrary/Functions/Rounding/Clamp.cs
@@ -1,8 +1,18 @@
namespace CSMic.StandardLibrary.Functions.Rounding
{
+ ///
+ /// Represents the standard-library clamp function.
+ ///
+ ///
+ /// The clamp function evaluates a numeric value and limits it to the supplied bounds.
+ ///
public class Clamp : FunctionBase, ICodedFunction
{
+ ///
+ /// Gets the expression-language name used to invoke this function.
+ ///
+ /// clamp.
public string Name
{
get
@@ -11,6 +21,10 @@
}
}
+ ///
+ /// Gets the argument signature expected by the clamp function.
+ ///
+ /// Three numeric arguments named value, low, and high.
public override IEnumerable ExpectedArguments
{
get
@@ -21,6 +35,15 @@
}
}
+ ///
+ /// Executes the clamp function.
+ ///
+ ///
+ /// The evaluated arguments supplied to the function. Exactly three numeric arguments are expected.
+ ///
+ ///
+ /// A numeric containing the input value constrained to the supplied range.
+ ///
public FunctionValue Execute(params FunctionArgument[] args)
{
return Execute(args, (_args) =>
diff --git a/src/StandardLibrary/Functions/Rounding/Floor.cs b/src/StandardLibrary/Functions/Rounding/Floor.cs
index bc4a028..de6963f 100644
--- a/src/StandardLibrary/Functions/Rounding/Floor.cs
+++ b/src/StandardLibrary/Functions/Rounding/Floor.cs
@@ -1,8 +1,18 @@
namespace CSMic.StandardLibrary.Functions.Rounding
{
+ ///
+ /// Represents the standard-library floor function.
+ ///
+ ///
+ /// The floor function evaluates a numeric value and rounds it toward negative infinity.
+ ///
public class Floor : FunctionBase, ICodedFunction
{
+ ///
+ /// Gets the expression-language name used to invoke this function.
+ ///
+ /// floor.
public string Name
{
get
@@ -11,6 +21,10 @@
}
}
+ ///
+ /// Gets the argument signature expected by the floor function.
+ ///
+ /// A single numeric argument named value.
public override IEnumerable ExpectedArguments
{
get
@@ -19,6 +33,15 @@
}
}
+ ///
+ /// Executes the floor function.
+ ///
+ ///
+ /// The evaluated arguments supplied to the function. Exactly one numeric argument is expected.
+ ///
+ ///
+ /// A numeric containing the largest integer less than or equal to the input.
+ ///
public FunctionValue Execute(params FunctionArgument[] args)
{
return Execute(args, (_args) =>
diff --git a/src/StandardLibrary/Functions/Rounding/Fractional.cs b/src/StandardLibrary/Functions/Rounding/Fractional.cs
index c1442ab..306bc72 100644
--- a/src/StandardLibrary/Functions/Rounding/Fractional.cs
+++ b/src/StandardLibrary/Functions/Rounding/Fractional.cs
@@ -1,8 +1,18 @@
namespace CSMic.StandardLibrary.Functions.Rounding
{
+ ///
+ /// Represents the standard-library frac function.
+ ///
+ ///
+ /// The frac function evaluates a numeric value and returns its fractional component.
+ ///
public class Fractional : FunctionBase, ICodedFunction
{
+ ///
+ /// Gets the expression-language name used to invoke this function.
+ ///
+ /// frac.
public string Name
{
get
@@ -11,6 +21,10 @@
}
}
+ ///
+ /// Gets the argument signature expected by the frac function.
+ ///
+ /// A single numeric argument named value.
public override IEnumerable ExpectedArguments
{
get
@@ -19,6 +33,15 @@
}
}
+ ///
+ /// Executes the frac function.
+ ///
+ ///
+ /// The evaluated arguments supplied to the function. Exactly one numeric argument is expected.
+ ///
+ ///
+ /// A numeric containing the fractional component of the input value.
+ ///
public FunctionValue Execute(params FunctionArgument[] args)
{
return Execute(args, (_args) =>
diff --git a/src/StandardLibrary/Functions/Rounding/Round.cs b/src/StandardLibrary/Functions/Rounding/Round.cs
index 7c8575d..7cc23eb 100644
--- a/src/StandardLibrary/Functions/Rounding/Round.cs
+++ b/src/StandardLibrary/Functions/Rounding/Round.cs
@@ -1,8 +1,18 @@
namespace CSMic.StandardLibrary.Functions.Rounding
{
+ ///
+ /// Represents the standard-library round function.
+ ///
+ ///
+ /// The round function evaluates a numeric value and rounds it to the requested precision.
+ ///
public class Round : FunctionBase, ICodedFunction
{
+ ///
+ /// Gets the expression-language name used to invoke this function.
+ ///
+ /// round.
public string Name
{
get
@@ -11,6 +21,10 @@
}
}
+ ///
+ /// Gets the argument signature expected by the round function.
+ ///
+ /// Two numeric arguments named value and precision.
public override IEnumerable ExpectedArguments
{
get
@@ -20,6 +34,15 @@
}
}
+ ///
+ /// Executes the round function.
+ ///
+ ///
+ /// The evaluated arguments supplied to the function. Exactly two numeric arguments are expected.
+ ///
+ ///
+ /// A numeric containing the input value rounded to the requested precision.
+ ///
public FunctionValue Execute(params FunctionArgument[] args)
{
return Execute(args, (_args) =>
diff --git a/src/StandardLibrary/Functions/Rounding/Truncate.cs b/src/StandardLibrary/Functions/Rounding/Truncate.cs
index 9917a7f..d29a06e 100644
--- a/src/StandardLibrary/Functions/Rounding/Truncate.cs
+++ b/src/StandardLibrary/Functions/Rounding/Truncate.cs
@@ -1,8 +1,18 @@
namespace CSMic.StandardLibrary.Functions.Rounding
{
+ ///
+ /// Represents the standard-library truncate function.
+ ///
+ ///
+ /// The truncate function evaluates a numeric value and removes its fractional component.
+ ///
public class Truncate : FunctionBase, ICodedFunction
{
+ ///
+ /// Gets the expression-language name used to invoke this function.
+ ///
+ /// truncate.
public string Name
{
get
@@ -11,6 +21,10 @@
}
}
+ ///
+ /// Gets the argument signature expected by the truncate function.
+ ///
+ /// A single numeric argument named value.
public override IEnumerable ExpectedArguments
{
get
@@ -19,6 +33,15 @@
}
}
+ ///
+ /// Executes the truncate function.
+ ///
+ ///
+ /// The evaluated arguments supplied to the function. Exactly one numeric argument is expected.
+ ///
+ ///
+ /// A numeric containing the input value with the fractional component removed.
+ ///
public FunctionValue Execute(params FunctionArgument[] args)
{
return Execute(args, (_args) =>
diff --git a/src/StandardLibrary/Functions/Trigonometry/Acos.cs b/src/StandardLibrary/Functions/Trigonometry/Acos.cs
index 37e2e6f..1195b65 100644
--- a/src/StandardLibrary/Functions/Trigonometry/Acos.cs
+++ b/src/StandardLibrary/Functions/Trigonometry/Acos.cs
@@ -1,8 +1,18 @@
namespace CSMic.StandardLibrary.Functions.Trigonometry
{
+ ///
+ /// Represents the standard-library acos function.
+ ///
+ ///
+ /// The acos function evaluates a numeric expression and returns its arccosine.
+ ///
public class Acos : FunctionBase, ICodedFunction
{
+ ///
+ /// Gets the expression-language name used to invoke this function.
+ ///
+ /// acos.
public string Name
{
get
@@ -11,6 +21,10 @@
}
}
+ ///
+ /// Gets the argument signature expected by the acos function.
+ ///
+ /// A single numeric argument named value.
public override IEnumerable ExpectedArguments
{
get
@@ -19,6 +33,15 @@
}
}
+ ///
+ /// Executes the acos function.
+ ///
+ ///
+ /// The evaluated arguments supplied to the function. Exactly one numeric argument is expected.
+ ///
+ ///
+ /// A numeric containing the arccosine of the input value.
+ ///
public FunctionValue Execute(params FunctionArgument[] args)
{
return Execute(args, (_args) =>
diff --git a/src/StandardLibrary/Functions/Trigonometry/Asin.cs b/src/StandardLibrary/Functions/Trigonometry/Asin.cs
index c5de34b..b877ac6 100644
--- a/src/StandardLibrary/Functions/Trigonometry/Asin.cs
+++ b/src/StandardLibrary/Functions/Trigonometry/Asin.cs
@@ -1,8 +1,18 @@
namespace CSMic.StandardLibrary.Functions.Trigonometry
{
+ ///
+ /// Represents the standard-library asin function.
+ ///
+ ///
+ /// The asin function evaluates a numeric expression and returns its arcsine.
+ ///
public class Asin : FunctionBase, ICodedFunction
{
+ ///
+ /// Gets the expression-language name used to invoke this function.
+ ///
+ /// asin.
public string Name
{
get
@@ -11,6 +21,10 @@
}
}
+ ///
+ /// Gets the argument signature expected by the asin function.
+ ///
+ /// A single numeric argument named value.
public override IEnumerable ExpectedArguments
{
get
@@ -19,6 +33,15 @@
}
}
+ ///
+ /// Executes the asin function.
+ ///
+ ///
+ /// The evaluated arguments supplied to the function. Exactly one numeric argument is expected.
+ ///
+ ///
+ /// A numeric containing the arcsine of the input value.
+ ///
public FunctionValue Execute(params FunctionArgument[] args)
{
return Execute(args, (_args) =>
diff --git a/src/StandardLibrary/Functions/Trigonometry/Atan.cs b/src/StandardLibrary/Functions/Trigonometry/Atan.cs
index 2c61574..65cbb84 100644
--- a/src/StandardLibrary/Functions/Trigonometry/Atan.cs
+++ b/src/StandardLibrary/Functions/Trigonometry/Atan.cs
@@ -1,8 +1,18 @@
namespace CSMic.StandardLibrary.Functions.Trigonometry
{
+ ///
+ /// Represents the standard-library atan function.
+ ///
+ ///
+ /// The atan function evaluates a numeric expression and returns its arctangent.
+ ///
public class Atan : FunctionBase, ICodedFunction
{
+ ///
+ /// Gets the expression-language name used to invoke this function.
+ ///
+ /// atan.
public string Name
{
get
@@ -11,6 +21,10 @@
}
}
+ ///
+ /// Gets the argument signature expected by the atan function.
+ ///
+ /// A single numeric argument named value.
public override IEnumerable ExpectedArguments
{
get
@@ -19,6 +33,15 @@
}
}
+ ///
+ /// Executes the atan function.
+ ///
+ ///
+ /// The evaluated arguments supplied to the function. Exactly one numeric argument is expected.
+ ///
+ ///
+ /// A numeric containing the arctangent of the input value.
+ ///
public FunctionValue Execute(params FunctionArgument[] args)
{
return Execute(args, (_args) =>
diff --git a/src/StandardLibrary/Functions/Trigonometry/Atan2.cs b/src/StandardLibrary/Functions/Trigonometry/Atan2.cs
index 22f91e2..7b06ee8 100644
--- a/src/StandardLibrary/Functions/Trigonometry/Atan2.cs
+++ b/src/StandardLibrary/Functions/Trigonometry/Atan2.cs
@@ -1,8 +1,18 @@
namespace CSMic.StandardLibrary.Functions.Trigonometry
{
+ ///
+ /// Represents the standard-library atan2 function.
+ ///
+ ///
+ /// The atan2 function evaluates two numeric expressions and returns the arctangent of their quotient.
+ ///
public class Atan2 : FunctionBase, ICodedFunction
{
+ ///
+ /// Gets the expression-language name used to invoke this function.
+ ///
+ /// atan2.
public string Name
{
get
@@ -11,6 +21,10 @@
}
}
+ ///
+ /// Gets the argument signature expected by the atan2 function.
+ ///
+ /// Two numeric arguments named y and x.
public override IEnumerable ExpectedArguments
{
get
@@ -20,6 +34,15 @@
}
}
+ ///
+ /// Executes the atan2 function.
+ ///
+ ///
+ /// The evaluated arguments supplied to the function. Exactly two numeric arguments are expected.
+ ///
+ ///
+ /// A numeric containing the arctangent of the supplied coordinates.
+ ///
public FunctionValue Execute(params FunctionArgument[] args)
{
return Execute(args, (_args) =>
diff --git a/src/StandardLibrary/Functions/Trigonometry/Cos.cs b/src/StandardLibrary/Functions/Trigonometry/Cos.cs
index efec96a..e493628 100644
--- a/src/StandardLibrary/Functions/Trigonometry/Cos.cs
+++ b/src/StandardLibrary/Functions/Trigonometry/Cos.cs
@@ -1,8 +1,18 @@
namespace CSMic.StandardLibrary.Functions.Trigonometry
{
+ ///
+ /// Represents the standard-library cos function.
+ ///
+ ///
+ /// The cos function evaluates a numeric expression and returns its cosine.
+ ///
public class Cos : FunctionBase, ICodedFunction
{
+ ///
+ /// Gets the expression-language name used to invoke this function.
+ ///
+ /// cos.
public string Name
{
get
@@ -11,6 +21,10 @@
}
}
+ ///
+ /// Gets the argument signature expected by the cos function.
+ ///
+ /// A single numeric argument named value.
public override IEnumerable ExpectedArguments
{
get
@@ -19,6 +33,15 @@
}
}
+ ///
+ /// Executes the cos function.
+ ///
+ ///
+ /// The evaluated arguments supplied to the function. Exactly one numeric argument is expected.
+ ///
+ ///
+ /// A numeric containing the cosine of the input value.
+ ///
public FunctionValue Execute(params FunctionArgument[] args)
{
return Execute(args, (_args) =>
diff --git a/src/StandardLibrary/Functions/Trigonometry/Hyperbolic/Acosh.cs b/src/StandardLibrary/Functions/Trigonometry/Hyperbolic/Acosh.cs
index 96712db..5a8a83f 100644
--- a/src/StandardLibrary/Functions/Trigonometry/Hyperbolic/Acosh.cs
+++ b/src/StandardLibrary/Functions/Trigonometry/Hyperbolic/Acosh.cs
@@ -1,8 +1,18 @@
namespace CSMic.StandardLibrary.Functions.Trigonometry.Hyperbolic
{
+ ///
+ /// Represents the standard-library acosh function.
+ ///
+ ///
+ /// The acosh function evaluates a numeric expression and returns its inverse hyperbolic cosine.
+ ///
public class Acosh : FunctionBase, ICodedFunction
{
+ ///
+ /// Gets the expression-language name used to invoke this function.
+ ///
+ /// acosh.
public string Name
{
get
@@ -11,6 +21,10 @@
}
}
+ ///
+ /// Gets the argument signature expected by the acosh function.
+ ///
+ /// A single numeric argument named value.
public override IEnumerable ExpectedArguments
{
get
@@ -19,6 +33,15 @@
}
}
+ ///
+ /// Executes the acosh function.
+ ///
+ ///
+ /// The evaluated arguments supplied to the function. Exactly one numeric argument is expected.
+ ///
+ ///
+ /// A numeric containing the inverse hyperbolic cosine of the input value.
+ ///
public FunctionValue Execute(params FunctionArgument[] args)
{
return Execute(args, (_args) =>
diff --git a/src/StandardLibrary/Functions/Trigonometry/Hyperbolic/Asinh.cs b/src/StandardLibrary/Functions/Trigonometry/Hyperbolic/Asinh.cs
index e84c2d7..5d43169 100644
--- a/src/StandardLibrary/Functions/Trigonometry/Hyperbolic/Asinh.cs
+++ b/src/StandardLibrary/Functions/Trigonometry/Hyperbolic/Asinh.cs
@@ -1,8 +1,18 @@
namespace CSMic.StandardLibrary.Functions.Trigonometry.Hyperbolic
{
+ ///
+ /// Represents the standard-library asinh function.
+ ///
+ ///
+ /// The asinh function evaluates a numeric expression and returns its inverse hyperbolic sine.
+ ///
public class Asinh : FunctionBase, ICodedFunction
{
+ ///
+ /// Gets the expression-language name used to invoke this function.
+ ///
+ /// asinh.
public string Name
{
get
@@ -11,6 +21,10 @@
}
}
+ ///
+ /// Gets the argument signature expected by the asinh function.
+ ///
+ /// A single numeric argument named value.
public override IEnumerable ExpectedArguments
{
get
@@ -19,6 +33,15 @@
}
}
+ ///
+ /// Executes the asinh function.
+ ///
+ ///
+ /// The evaluated arguments supplied to the function. Exactly one numeric argument is expected.
+ ///
+ ///
+ /// A numeric containing the inverse hyperbolic sine of the input value.
+ ///
public FunctionValue Execute(params FunctionArgument[] args)
{
return Execute(args, (_args) =>
diff --git a/src/StandardLibrary/Functions/Trigonometry/Hyperbolic/Atanh.cs b/src/StandardLibrary/Functions/Trigonometry/Hyperbolic/Atanh.cs
index a768e51..811001d 100644
--- a/src/StandardLibrary/Functions/Trigonometry/Hyperbolic/Atanh.cs
+++ b/src/StandardLibrary/Functions/Trigonometry/Hyperbolic/Atanh.cs
@@ -1,8 +1,18 @@
namespace CSMic.StandardLibrary.Functions.Trigonometry.Hyperbolic
{
+ ///
+ /// Represents the standard-library atanh function.
+ ///
+ ///
+ /// The atanh function evaluates a numeric expression and returns its inverse hyperbolic tangent.
+ ///
public class Atanh : FunctionBase, ICodedFunction
{
+ ///
+ /// Gets the expression-language name used to invoke this function.
+ ///
+ /// atanh.
public string Name
{
get
@@ -11,6 +21,10 @@
}
}
+ ///
+ /// Gets the argument signature expected by the atanh function.
+ ///
+ /// A single numeric argument named value.
public override IEnumerable ExpectedArguments
{
get
@@ -19,6 +33,15 @@
}
}
+ ///
+ /// Executes the atanh function.
+ ///
+ ///
+ /// The evaluated arguments supplied to the function. Exactly one numeric argument is expected.
+ ///
+ ///
+ /// A numeric containing the inverse hyperbolic tangent of the input value.
+ ///
public FunctionValue Execute(params FunctionArgument[] args)
{
return Execute(args, (_args) =>
diff --git a/src/StandardLibrary/Functions/Trigonometry/Hyperbolic/Cosh.cs b/src/StandardLibrary/Functions/Trigonometry/Hyperbolic/Cosh.cs
index 8ed7376..af1b680 100644
--- a/src/StandardLibrary/Functions/Trigonometry/Hyperbolic/Cosh.cs
+++ b/src/StandardLibrary/Functions/Trigonometry/Hyperbolic/Cosh.cs
@@ -1,8 +1,18 @@
namespace CSMic.StandardLibrary.Functions.Trigonometry.Hyperbolic
{
+ ///
+ /// Represents the standard-library cosh function.
+ ///
+ ///
+ /// The cosh function evaluates a numeric expression and returns its hyperbolic cosine.
+ ///
public class Cosh : FunctionBase, ICodedFunction
{
+ ///
+ /// Gets the expression-language name used to invoke this function.
+ ///
+ /// cosh.
public string Name
{
get
@@ -11,6 +21,10 @@
}
}
+ ///
+ /// Gets the argument signature expected by the cosh function.
+ ///
+ /// A single numeric argument named value.
public override IEnumerable ExpectedArguments
{
get
@@ -19,6 +33,15 @@
}
}
+ ///
+ /// Executes the cosh function.
+ ///
+ ///
+ /// The evaluated arguments supplied to the function. Exactly one numeric argument is expected.
+ ///
+ ///
+ /// A numeric containing the hyperbolic cosine of the input value.
+ ///
public FunctionValue Execute(params FunctionArgument[] args)
{
return Execute(args, (_args) =>
diff --git a/src/StandardLibrary/Functions/Trigonometry/Hyperbolic/Sinh.cs b/src/StandardLibrary/Functions/Trigonometry/Hyperbolic/Sinh.cs
index cd30688..21ea07a 100644
--- a/src/StandardLibrary/Functions/Trigonometry/Hyperbolic/Sinh.cs
+++ b/src/StandardLibrary/Functions/Trigonometry/Hyperbolic/Sinh.cs
@@ -1,8 +1,18 @@
namespace CSMic.StandardLibrary.Functions.Trigonometry.Hyperbolic
{
+ ///
+ /// Represents the standard-library sinh function.
+ ///
+ ///
+ /// The sinh function evaluates a numeric expression and returns its hyperbolic sine.
+ ///
public class Sinh : FunctionBase, ICodedFunction
{
+ ///
+ /// Gets the expression-language name used to invoke this function.
+ ///
+ /// sinh.
public string Name
{
get
@@ -11,6 +21,10 @@
}
}
+ ///
+ /// Gets the argument signature expected by the sinh function.
+ ///
+ /// A single numeric argument named value.
public override IEnumerable ExpectedArguments
{
get
@@ -19,6 +33,15 @@
}
}
+ ///
+ /// Executes the sinh function.
+ ///
+ ///
+ /// The evaluated arguments supplied to the function. Exactly one numeric argument is expected.
+ ///
+ ///
+ /// A numeric containing the hyperbolic sine of the input value.
+ ///
public FunctionValue Execute(params FunctionArgument[] args)
{
return Execute(args, (_args) =>
diff --git a/src/StandardLibrary/Functions/Trigonometry/Hyperbolic/Tanh.cs b/src/StandardLibrary/Functions/Trigonometry/Hyperbolic/Tanh.cs
index 3ea2ae8..24f0e18 100644
--- a/src/StandardLibrary/Functions/Trigonometry/Hyperbolic/Tanh.cs
+++ b/src/StandardLibrary/Functions/Trigonometry/Hyperbolic/Tanh.cs
@@ -1,8 +1,18 @@
namespace CSMic.StandardLibrary.Functions.Trigonometry.Hyperbolic
{
+ ///
+ /// Represents the standard-library tanh function.
+ ///
+ ///
+ /// The tanh function evaluates a numeric expression and returns its hyperbolic tangent.
+ ///
public class Tanh : FunctionBase, ICodedFunction
{
+ ///
+ /// Gets the expression-language name used to invoke this function.
+ ///
+ /// tanh.
public string Name
{
get
@@ -11,6 +21,10 @@
}
}
+ ///
+ /// Gets the argument signature expected by the tanh function.
+ ///
+ /// A single numeric argument named value.
public override IEnumerable ExpectedArguments
{
get
@@ -19,6 +33,15 @@
}
}
+ ///
+ /// Executes the tanh function.
+ ///
+ ///
+ /// The evaluated arguments supplied to the function. Exactly one numeric argument is expected.
+ ///
+ ///
+ /// A numeric containing the hyperbolic tangent of the input value.
+ ///
public FunctionValue Execute(params FunctionArgument[] args)
{
return Execute(args, (_args) =>
diff --git a/src/StandardLibrary/Functions/Trigonometry/Sin.cs b/src/StandardLibrary/Functions/Trigonometry/Sin.cs
index df0a48f..a32a8e7 100644
--- a/src/StandardLibrary/Functions/Trigonometry/Sin.cs
+++ b/src/StandardLibrary/Functions/Trigonometry/Sin.cs
@@ -1,8 +1,18 @@
namespace CSMic.StandardLibrary.Functions.Trigonometry
{
+ ///
+ /// Represents the standard-library sin function.
+ ///
+ ///
+ /// The sin function evaluates a numeric expression and returns its sine.
+ ///
public class Sin : FunctionBase, ICodedFunction
{
+ ///
+ /// Gets the expression-language name used to invoke this function.
+ ///
+ /// sin.
public string Name
{
get
@@ -11,6 +21,10 @@
}
}
+ ///
+ /// Gets the argument signature expected by the sin function.
+ ///
+ /// A single numeric argument named value.
public override IEnumerable ExpectedArguments
{
get
@@ -19,6 +33,15 @@
}
}
+ ///
+ /// Executes the sin function.
+ ///
+ ///
+ /// The evaluated arguments supplied to the function. Exactly one numeric argument is expected.
+ ///
+ ///
+ /// A numeric containing the sine of the input value.
+ ///
public FunctionValue Execute(params FunctionArgument[] args)
{
return Execute(args, (_args) =>
diff --git a/src/StandardLibrary/Functions/Trigonometry/Tan.cs b/src/StandardLibrary/Functions/Trigonometry/Tan.cs
index 68e0fe5..5ecb986 100644
--- a/src/StandardLibrary/Functions/Trigonometry/Tan.cs
+++ b/src/StandardLibrary/Functions/Trigonometry/Tan.cs
@@ -1,8 +1,18 @@
namespace CSMic.StandardLibrary.Functions.Trigonometry
{
+ ///
+ /// Represents the standard-library tan function.
+ ///
+ ///
+ /// The tan function evaluates a numeric expression and returns its tangent.
+ ///
public class Tan : FunctionBase, ICodedFunction
{
+ ///
+ /// Gets the expression-language name used to invoke this function.
+ ///
+ /// tan.
public string Name
{
get
@@ -11,6 +21,10 @@
}
}
+ ///
+ /// Gets the argument signature expected by the tan function.
+ ///
+ /// A single numeric argument named value.
public override IEnumerable ExpectedArguments
{
get
@@ -19,6 +33,15 @@
}
}
+ ///
+ /// Executes the tan function.
+ ///
+ ///
+ /// The evaluated arguments supplied to the function. Exactly one numeric argument is expected.
+ ///
+ ///
+ /// A numeric containing the tangent of the input value.
+ ///
public FunctionValue Execute(params FunctionArgument[] args)
{
return Execute(args, (_args) =>
diff --git a/src/StandardLibrary/functions/AbsoluteValue.cs b/src/StandardLibrary/functions/AbsoluteValue.cs
index d40bca8..de0947b 100644
--- a/src/StandardLibrary/functions/AbsoluteValue.cs
+++ b/src/StandardLibrary/functions/AbsoluteValue.cs
@@ -2,8 +2,18 @@
namespace CSMic.StandardLibrary.Functions
{
+ ///
+ /// Represents the standard-library abs function.
+ ///
+ ///
+ /// The abs function evaluates a numeric expression and returns its absolute value.
+ ///
public class AbsoluteValue : FunctionBase, ICodedFunction
{
+ ///
+ /// Gets the expression-language name used to invoke this function.
+ ///
+ /// abs.
public string Name
{
get
@@ -12,6 +22,10 @@ namespace CSMic.StandardLibrary.Functions
}
}
+ ///
+ /// Gets the argument signature expected by the abs function.
+ ///
+ /// A single numeric argument named value.
public override IEnumerable ExpectedArguments
{
get
@@ -20,6 +34,15 @@ namespace CSMic.StandardLibrary.Functions
}
}
+ ///
+ /// Executes the abs function.
+ ///
+ ///
+ /// The evaluated arguments supplied to the function. Exactly one numeric argument is expected.
+ ///
+ ///
+ /// A numeric containing the absolute value of the input.
+ ///
public FunctionValue Execute(params FunctionArgument[] args)
{
return base.Execute(args, (_args) =>
diff --git a/src/StandardLibrary/functions/Max.cs b/src/StandardLibrary/functions/Max.cs
index 6a62f27..2e688ff 100644
--- a/src/StandardLibrary/functions/Max.cs
+++ b/src/StandardLibrary/functions/Max.cs
@@ -7,8 +7,18 @@ using System.Threading.Tasks;
namespace CSMic.StandardLibrary.Functions
{
+ ///
+ /// Represents the standard-library max function.
+ ///
+ ///
+ /// The max function evaluates two numeric expressions and returns the larger value.
+ ///
public class Max : FunctionBase, ICodedFunction
{
+ ///
+ /// Gets the expression-language name used to invoke this function.
+ ///
+ /// max.
public string Name
{
get
@@ -17,6 +27,10 @@ namespace CSMic.StandardLibrary.Functions
}
}
+ ///
+ /// Gets the argument signature expected by the max function.
+ ///
+ /// Two numeric arguments named first and second.
public override IEnumerable ExpectedArguments
{
get
@@ -26,6 +40,15 @@ namespace CSMic.StandardLibrary.Functions
}
}
+ ///
+ /// Executes the max function.
+ ///
+ ///
+ /// The evaluated arguments supplied to the function. Exactly two numeric arguments are expected.
+ ///
+ ///
+ /// A numeric containing the larger of the two input values.
+ ///
public FunctionValue Execute(params FunctionArgument[] args)
{
return base.Execute(args, (_args) =>
diff --git a/src/StandardLibrary/functions/Min.cs b/src/StandardLibrary/functions/Min.cs
index 620262e..845eb11 100644
--- a/src/StandardLibrary/functions/Min.cs
+++ b/src/StandardLibrary/functions/Min.cs
@@ -7,8 +7,18 @@ using System.Threading.Tasks;
namespace CSMic.StandardLibrary.Functions
{
+ ///
+ /// Represents the standard-library min function.
+ ///
+ ///
+ /// The min function evaluates two numeric expressions and returns the smaller value.
+ ///
public class Min : FunctionBase, ICodedFunction
{
+ ///
+ /// Gets the expression-language name used to invoke this function.
+ ///
+ /// min.
public string Name
{
get
@@ -17,6 +27,10 @@ namespace CSMic.StandardLibrary.Functions
}
}
+ ///
+ /// Gets the argument signature expected by the min function.
+ ///
+ /// Two numeric arguments named first and second.
public override IEnumerable ExpectedArguments
{
get
@@ -26,6 +40,15 @@ namespace CSMic.StandardLibrary.Functions
}
}
+ ///
+ /// Executes the min function.
+ ///
+ ///
+ /// The evaluated arguments supplied to the function. Exactly two numeric arguments are expected.
+ ///
+ ///
+ /// A numeric containing the smaller of the two input values.
+ ///
public FunctionValue Execute(params FunctionArgument[] args)
{
return base.Execute(args, (_args) =>