absolutevalue/ko: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "source>" to "syntaxhighlight>") |
m (Text replacement - "<source" to "<syntaxhighlight") |
||
Line 4: | Line 4: | ||
|usage= | |usage= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
[h: val = absolutevalue(num)] | [h: val = absolutevalue(num)] | ||
</syntaxhighlight> | </syntaxhighlight> | ||
이 함수를 아래와 같이 줄여서 쓸 수 있다: | 이 함수를 아래와 같이 줄여서 쓸 수 있다: | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
[h: val = abs(num)] | [h: val = abs(num)] | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 14: | Line 14: | ||
|examples= | |examples= | ||
====음수(Negative Number)==== | ====음수(Negative Number)==== | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
[r: absolutevalue(-3)] | [r: absolutevalue(-3)] | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Returns:< | Returns:<syntaxhighlight lang="mtmacro" line start=2>3</syntaxhighlight> | ||
====양수(Positive Number)==== | ====양수(Positive Number)==== | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
[r: abs(4)] | [r: abs(4)] | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Returns:< | Returns:<syntaxhighlight lang="mtmacro" line start=2>4</syntaxhighlight> | ||
====소수(Decimal Number)==== | ====소수(Decimal Number)==== | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
[r: abs(3.4)] | [r: abs(3.4)] | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Returns:< | Returns:<syntaxhighlight lang="mtmacro" line start=2>3.4</syntaxhighlight> | ||
}} | }} | ||
[[Category:Mathematical Function]] | [[Category:Mathematical Function]] |
Latest revision as of 17:23, 14 March 2023
absolutevalue() Function
절대값을 반환한다. The absolute value of a number 는 부호(+,-)를 제외하곤 바뀌지 않는다.
Usage
[h: val = absolutevalue(num)]
이 함수를 아래와 같이 줄여서 쓸 수 있다:
[h: val = abs(num)]
Examples
====음수(Negative Number)====
Returns:
Returns:
Returns:
[r: absolutevalue(-3)]
3
양수(Positive Number)
[r: abs(4)]
4
소수(Decimal Number)
[r: abs(3.4)]
3.4