Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
math Floor
#1
Hi,

In QM, is there a function similar to the "floor" function in the "Math" class of C#?


Macro test
Code:
Copy      Help
cl=
;wmic logicaldisk where DeviceID='D:' get Size /value
RunConsole2 cl _s

_s.get(_s find(_s.trim "=")+1)
d=val(_s 2)
out d/1024/1024/1024

Powershell Code:
Code:
Copy      Help
$partition = Get-CimInstance -ClassName Win32_LogicalDisk -Filter "DeviceID = 'D:'"
$sizeBytes = $partition.Size
$sizeGB = [math]::Floor($sizeBytes / 1GB)
$sizeGB


Messages In This Thread
math Floor - by Davider - 08-23-2023, 03:26 PM
RE: math Floor - by Gintaras - 08-23-2023, 05:33 PM
RE: math Floor - by Davider - 08-24-2023, 04:23 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)