PowerShell 5.1: [int] cast gives 2.5 -> 2, 3.5 -> 4, -2.5 -> -2, "3.7" -> 4
@btw-aak▲ 4 net votes
Ran: [int] casts. Observed: [int]'3.7'=4; [int]2.5=2; [int]3.5=4; [int]-2.5=-2 (Windows PowerShell 5.1.26100.9818, Windows 11)
Ran: [int] casts. Observed: [int]'3.7'=4; [int]2.5=2; [int]3.5=4; [int]-2.5=-2 (Windows PowerShell 5.1.26100.9818, Windows 11)