NSNumber(FWApplication)

@interface NSNumber (FWApplication)

/// 转换为CGFloat
@property (nonatomic, assign, readonly) CGFloat fw_CGFloatValue NS_REFINED_FOR_SWIFT;

/// 四舍五入,去掉末尾0,最多digit位,小数分隔符为.,分组分隔符为空,示例:12345.6789 => 12345.68
- (NSString *)fw_roundString:(NSInteger)digit NS_REFINED_FOR_SWIFT;

/// 取上整,去掉末尾0,最多digit位,小数分隔符为.,分组分隔符为空,示例:12345.6789 => 12345.68
- (NSString *)fw_ceilString:(NSInteger)digit NS_REFINED_FOR_SWIFT;

/// 取下整,去掉末尾0,最多digit位,小数分隔符为.,分组分隔符为空,示例:12345.6789 => 12345.67
- (NSString *)fw_floorString:(NSInteger)digit NS_REFINED_FOR_SWIFT;

/// 四舍五入,去掉末尾0,最多digit位,示例:12345.6789 => 12345.68
- (NSNumber *)fw_roundNumber:(NSUInteger)digit NS_REFINED_FOR_SWIFT;

/// 取上整,去掉末尾0,最多digit位,示例:12345.6789 => 12345.68
- (NSNumber *)fw_ceilNumber:(NSUInteger)digit NS_REFINED_FOR_SWIFT;

/// 取下整,去掉末尾0,最多digit位,示例:12345.6789 => 12345.67
- (NSNumber *)fw_floorNumber:(NSUInteger)digit NS_REFINED_FOR_SWIFT;

@end

Undocumented

  • 转换为CGFloat

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGFloat fw_CGFloatValue;
  • 四舍五入,去掉末尾0,最多digit位,小数分隔符为.,分组分隔符为空,示例:12345.6789 => 12345.68

    Declaration

    Objective-C

    - (nonnull NSString *)fw_roundString:(NSInteger)digit;
  • 取上整,去掉末尾0,最多digit位,小数分隔符为.,分组分隔符为空,示例:12345.6789 => 12345.68

    Declaration

    Objective-C

    - (nonnull NSString *)fw_ceilString:(NSInteger)digit;
  • 取下整,去掉末尾0,最多digit位,小数分隔符为.,分组分隔符为空,示例:12345.6789 => 12345.67

    Declaration

    Objective-C

    - (nonnull NSString *)fw_floorString:(NSInteger)digit;
  • 四舍五入,去掉末尾0,最多digit位,示例:12345.6789 => 12345.68

    Declaration

    Objective-C

    - (nonnull NSNumber *)fw_roundNumber:(NSUInteger)digit;
  • 取上整,去掉末尾0,最多digit位,示例:12345.6789 => 12345.68

    Declaration

    Objective-C

    - (nonnull NSNumber *)fw_ceilNumber:(NSUInteger)digit;
  • 取下整,去掉末尾0,最多digit位,示例:12345.6789 => 12345.67

    Declaration

    Objective-C

    - (nonnull NSNumber *)fw_floorNumber:(NSUInteger)digit;