Exemple #1
0
Decimal Decimal::op_subtract(const Decimal rhs) const {

  TTInt rett;
  rett = this->GetTTInt();
  rett.Sub(rhs.GetTTInt());

  Decimal ret;
  ret.SetTTInt(rett);

  return ret;
}
Exemple #2
0
Decimal Decimal::op_add(const Decimal rhs) const {

  TTInt rett;
  rett = this->GetTTInt();
  rett.Add(rhs.GetTTInt());

  Decimal ret;
  ret.SetTTInt(rett);

  return ret;
}
Exemple #3
0
Decimal Decimal::op_divide(const Decimal rhs) const {
  
  TTLInt rett;
  rett = this->GetTTInt();
  rett *= Decimal::kMaxScaleFactor;
  rett /= rhs.GetTTInt();

  Decimal ret;
  ret.SetTTInt(rett);
  
  return ret;
}
Exemple #4
0
Decimal Decimal::op_multiply(const Decimal rhs) const {
  
  TTLInt rett;
  rett = this->GetTTInt();
  rett *= rhs.GetTTInt();
  rett /= Decimal::kMaxScaleFactor;

  Decimal ret;
  ret.SetTTInt(rett);

  return ret;
}