UDF > WinAPIEx > Conversion >


_WinAPI_FloatToInt

Convertit une valeur float sur 4 octets en un sinteger

#include <WinAPIConv.au3>
_WinAPI_FloatToInt ( $nFloat )

Paramètre

$nFloat Valeur à virgule flottante

Valeur de retour

Retourne une valeur à virgule flottante sur 4 octets sous forme d'integer

Exemple

#include <MsgBoxConstants.au3>
#include <WinAPIConv.au3>

Example()

Func Example()
    Local $fFloat , $sText, $iInt
    $fFloat  = 10.55
    $iInt = _WinAPI_FloatToInt($fFloat)
    $sText = "Le Float " & $fFloat  & " est convertit en Integer " & $iInt & " (Hex = " & Hex($iInt) & ")"
    MsgBox($MB_SYSTEMMODAL, "Exemple _WinAPI_FloatToInt", $sText)
EndFunc   ;==>Example