![Cadot Cadot]()
Sidney CadotFor C99 at least the rounding direction of implicit conversions andcasts from floating-point types to integer types is defined astowards-zero, i.e. truncating (6.3.1.4 clause 1). I don''t have a C89standard handy, but I suspect the same is true there.Best regards,Sidney Cadot 这篇关于如何将double转换为short?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-29 02:11