Got a question that the wiki doesn't answer? Ask on the forum (preferred), or join us on IRC.

BeastNode

CommandHelper/Staged/API/abs

From EngineHub.org Wiki
Jump to: navigation, search



Vital Info

Name abs
Returns mixed
Usages arg
Throws CastException
Since 3.1.2
Restricted
No
Optimizations CONSTANT_OFFLINE
CACHE_RETURN

Description

Returns the absolute value of the argument.

Usages

abs(arg)

Examples (How do these work?)

Example 1

Demonstrates a positive number

Given the following code:

1   abs(5)


The output would be:

:5

Example 2

Demonstrates a negative number

Given the following code:

1   abs(-5)


The output would be:

:5





Navigation menu