ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


functions:sgn

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

functions:sgn [2017/03/15 10:38] – created korshunfunctions:sgn [2017/03/15 10:39] (current) korshun
Line 1: Line 1:
-====== abs ======+====== sgn ======
 {{tag>math}} {{tag>math}}
 ''int sgn(num x)'' ''int sgn(num x)''
Line 13: Line 13:
 ===== Examples ===== ===== Examples =====
 <code> <code>
-sgn(7) -> 1 +sgn(    7) -> 1 
-sgn(-7) -> -1 +sgn(   -7) -> -1 
-sgn(12.3) -> 1+sgn( 12.3) -> 1
 sgn(-12.3) -> -1 sgn(-12.3) -> -1
-sgn(0) -> 0+sgn(    0) -> 0
 </code> </code>
functions/sgn.1489567096.txt.gz · Last modified: 2017/03/15 10:38 by korshun