Home > @silence_zhpf/utils > Money > sub
Money.sub() method
此函数从一个 Money 对象的值中减去另一个,并返回一个新的 Money 对象和结果。
Signature:
sub(other: Money): Money;
 
Parameters
  
    
      | Parameter | 
      Type | 
      Description | 
    
  
  
    
      | other | 
      Money | 
      Money 对象表示要从当前 Money 对象中减去的金额。 | 
    
  
Returns:
Money
Money 类的新实例,其值等于当前实例的值与作为参数传递的 other 实例的值之间的差值。