7 lines
73 B
Python
7 lines
73 B
Python
|
|
||
|
# sign function
|
||
|
def sgn(x):
|
||
|
if x>=0:
|
||
|
return 1
|
||
|
return -1
|