SGN

From MCS Wiki AVR
Revision as of 18:43, 12 February 2013 by Admin (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Action

Returns the sign of a float value.

 

 

Syntax

var = SGN( x )

 

 

Remarks

Var

A single or double variable that is assigned with the SGNS of variable x.

X

The single or double to get the sign of.

 

For values <0, -1 will be returned

For 0, 0 will be returned

For values >0, 1 will be returned

 

 

See Also

INT , FIX , ROUND

 

 

Example


Dim S As Single , X As Single , Y As Single
X = 2.3 : S = Sgn(x) 
Print S
X = -2.3 : S = Sgn(x)
Print S
End

Languages   English Deutsch  
Personal tools
Namespaces
Variants
Actions
Navigation
In other languages
Language