absolutevalue/ko

From RPTools Wiki
Revision as of 23:59, 14 March 2023 by Taustin (talk | contribs) (Text replacement - "<source" to "<syntaxhighlight")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

absolutevalue() Function

절대값을 반환한다. The absolute value of a number 는 부호(+,-)를 제외하곤 바뀌지 않는다.

Usage

[h: val = absolutevalue(num)]

이 함수를 아래와 같이 줄여서 쓸 수 있다:

[h: val = abs(num)]

Examples

====음수(Negative Number)====
[r: absolutevalue(-3)]
Returns:
3


양수(Positive Number)

[r: abs(4)]
Returns:
4


소수(Decimal Number)

[r: abs(3.4)]
Returns:
3.4