lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] valyuta/002 5f00c5a 43/65: Add a commented-out idea


From: Greg Chicares
Subject: [lmi-commits] [lmi] valyuta/002 5f00c5a 43/65: Add a commented-out idea
Date: Wed, 16 Sep 2020 16:55:19 -0400 (EDT)

branch: valyuta/002
commit 5f00c5a23303610a4ed382d2d3aa9dd02663d267
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Add a commented-out idea
---
 currency.hpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/currency.hpp b/currency.hpp
index 91ec0f7..be1992a 100644
--- a/currency.hpp
+++ b/currency.hpp
@@ -129,6 +129,7 @@ class currency
     // ...and a bit insidious:
 //  data_type from_double(double d) const {return 
static_cast<data_type>(100.000000000001 * d);}
     // ...less bad:
+//  data_type from_double(double d) const {return 
bourn_cast<data_type>(round(cents_per_dollar * d));}
     data_type from_double(double d) const {return round(cents_per_dollar * d);}
     double to_double() const {return bourn_cast<double>(m_) / 
cents_per_dollar;}
 //  data_type from_double(double d) const {return 
static_cast<data_type>(cents_per_dollar * d);}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]