NSDecimalNumber

public extension NSDecimalNumber
extension NSDecimalNumber: Comparable

Public Properties

  • Constant for -1.

    Declaration

    Swift

    static let negativeOne: NSDecimalNumber

Public Functions

  • Returns the absolute value of the receiver.

    let retval = NSDecimalNumber(value: -5).abs()
    
    // do something with retval which is 5
    

    Declaration

    Swift

    func abs() -> NSDecimalNumber
  • Returns the result of multiplying the absolute value of the receiver by -1.

    let retval = NSDecimalNumber(value: -5).negative()
    
    // do something with retval which is -5
    

    Declaration

    Swift

    func negative() -> NSDecimalNumber
  • Returns the result of multiplying the receiver by -1.

    let retval = NSDecimalNumber(value: 5).inverted()
    
    // do something with retval which is -5
    

    Declaration

    Swift

    func inverted() -> NSDecimalNumber

Comparable

  • Declaration

    Swift

    public static func < (lhs: NSDecimalNumber, rhs: NSDecimalNumber) -> Bool