Hello Experts,
Is there any inbuild FLOOR function to do FLOOR func in mathmetics in awk script like in FlOOR Func in C.
Ex:- floor(2.9) = 2
floor(2.1) = 2
floor(2.0) = 2
floor(-2.0) = 2
floor(-2.1) = -3
floor(-2.9) = -3
If there does not exist in awk script please help me some tricks to do it ...
Thanks in advance..
User_prady
GOT the answer
I made a func like below
function vint(y){
if (y < 0){
if(int(y) == y )
return int(y)
else
return int(y)-1
}
else
return int(y)
}
Thank you very much..
user_prady
1 Like