Round()

Syntaxe

Resultat.f = Round(Nombre.f, Mode)
Description
Arrondi le nombre flottant spécifié selon le mode choisi. 'Mode' peut prendre l'une des valeurs suivantes :
  #PB_Round_Down   : le nombre est arrondi par défaut (partie entière seule)
  #PB_Round_Up     : le nombre est arrondi par excès.
  #PB_Round_Nearest: le nombre est arrondi à l'entier le plus proche (0.5 est arrondi à 1)

Exemple:

  Debug Round(11.6, #PB_Round_Down)    ; Affichera '11'
  Debug Round(11.6, #PB_Round_Up)      ; Affichera '12'
  Debug Round(11.6, #PB_Round_Nearest) ; Affichera '12'
  Debug Round(11.4, #PB_Round_Nearest) ; Affichera '11'
  Debug Round(11.5, #PB_Round_Nearest) ; Affichera '12'

OS Supportés

Tous

<- Pow() - Math Index - Sin() ->