What is up with this in ColdFusion's DecimalFormat() function? How do I get the correct result?

前端 未结 4 1755
攒了一身酷
攒了一身酷 2021-01-18 16:27





DecimalFormat(#number1#): #DecimalFormat(n         


        
4条回答
  •  走了就别回头了
    2021-01-18 17:14

    DecimalFormat is a formatting function. Not a Mathematical function. Its job is not to round your number for you, unfortunately CF lacks good mathematical functions for decimals so you will have to write your own.

    Here is one someone wrote on the CF livedocs page for round():

      
          
          
    
          
      
    

提交回复
热议问题