Skip to content
Narta Xaymar Dirks edited this page Oct 27, 2026 · 1 revision

Blitz3DBlitzPlusBlitzBasic

Sgn

Sgn(value)

Description

The sign of a number: -1 for a number below 0, 0 for 0 and 1 for a number above 0, as an integer or a float like the number.

Examples

Print Sgn(-12)
Print Sgn(0)
Print Sgn(0.5)
-1
0
1.0

Related Commands

SatULong 〔BlitzLLVM〕, SatUShort 〔BlitzLLVM〕, Sin, Sqr

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally