摘要:
double RV5SV1AmpTmV =[ self roundFloat:CGFloatSV1+CGFloatRV5 ]; // 四舍五入保留三位小数 #pragma mark - 四舍五入保留三位小数 -(float)roundFloat:(float)price{ NSString *tem 阅读全文
摘要:
CGFloat f = 123.1234567890; NSString *str=[NSString stringWithFormat:@”%.2f”, f]; 如上所述:字符串格式化,格式出输入%.2f ,及表示两位小数 如果取后3位即 %.3f 后4位即 %.4f 阅读全文