Add XMLDoc documentation to functions
Some checks failed
Build / build (push) Successful in 33s
Tests / tests (push) Failing after 34s

This commit is contained in:
codex 2026-06-28 00:06:30 -05:00
commit a936188e46
10 changed files with 316 additions and 1 deletions

View file

@ -4,8 +4,18 @@ using System.Text;
namespace CSMic.StandardLibrary.Functions
{
/// <summary>
/// Represents the standard-library <c>sqrt</c> function.
/// </summary>
/// <remarks>
/// The <c>sqrt</c> function evaluates a numeric expression and returns its square root.
/// </remarks>
public class SquareRoot: FunctionBase, ICodedFunction
{
/// <summary>
/// Gets the expression-language name used to invoke this function.
/// </summary>
/// <value><c>sqrt</c>.</value>
public string Name
{
get
@ -14,6 +24,10 @@ namespace CSMic.StandardLibrary.Functions
}
}
/// <summary>
/// Gets the argument signature expected by the <c>sqrt</c> function.
/// </summary>
/// <value>A single numeric argument named <c>value</c>.</value>
public override IEnumerable<FunctionArgument> ExpectedArguments
{
get
@ -22,6 +36,15 @@ namespace CSMic.StandardLibrary.Functions
}
}
/// <summary>
/// Executes the <c>sqrt</c> function.
/// </summary>
/// <param name="args">
/// The evaluated arguments supplied to the function. Exactly one numeric argument is expected.
/// </param>
/// <returns>
/// A numeric <see cref="FunctionValue"/> containing the square root of the input.
/// </returns>
public FunctionValue Execute(params FunctionArgument[] args)
{
return base.Execute(args, (_args) =>