< Dice‎ | BuiltinFunctions
Revision as of 21:46, 27 April 2017 by Skizzerz (talk | contribs) (Created page with "{{APIdoc|BuiltinFunction.Abs Method (FunctionContext)}} Computes the absolute value of the argument. {{ns}} == Syntax == <syntaxhighlight lang="C#"> [DiceFunction("abs", Sco...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

BuiltinFunction.Abs Method (FunctionContext)

From DiceRoller Documentation

Computes the absolute value of the argument.

  • Namespace: Dice
  • Assembly: DiceRoller (in DiceRoller.dll)

Syntax

[DiceFunction("abs", Scope = FunctionScope.Global)]
public static void Abs(
    FunctionContext context
)

Parameters

context
Type: Dice.FunctionContext
The context of the function call.

Exceptions

Exception Condition
DiceException (DiceErrorCode.IncorrectArity) context.Arguments.Count is not exactly 1.
DiceException (DiceErrorCode.IncorrectArgType) context.Arguments[0] is a comparison.