古詩詞大全網 - 古詩大全 - trunc是什麽意思?

trunc是什麽意思?

最簡單的應用是,trunc是取整函數,擴展用到去壹法的舍去函數.

如:trunc(12.354),返回值12

trunc(12.354,1),返回值12.3

trunc(12.354,-1),返回值10

與rounddown()使用基本壹致