@@ -50,33 +50,33 @@ class CalculationAlgorithm
50
50
51
51
52
52
// VerifyIfStringIsNumerical - Checks whether std::string argument is a true number or not
53
- // Arguments : sNumberTest - The number string to check.
53
+ // Parameters : sNumberTest - The number string to check.
54
54
// Return Values: TRUE or 1 for number, FALSE or 0 for not a number.
55
55
//
56
56
bool VerifyIfStringIsNumerical (const std::string sNumberTest );
57
57
58
58
// FormatValueForDisplay - Formats a specific value for display output.
59
59
// - Has a max of 15-16dp.
60
- // Arguments : dValue - The number to format.
60
+ // Parameters : dValue - The number to format.
61
61
// Return Value: Formatted number as a string.
62
62
//
63
63
std::string FormatValueForDisplay (long double dValue);
64
64
65
65
// FormatValueForAlgorithm - Formats a specific value for internal algorithm calculations.
66
66
// - Has a max of 18-19dp.
67
- // Arguments : dValue - The number to format.
67
+ // Parameters : dValue - The number to format.
68
68
// Return Value: Formatted number as a string.
69
69
//
70
70
std::string FormatValueForAlgorithm (long double dValue);
71
71
72
72
// FormatStringForDisplay - Formats a calculation string for display output, by rounding the numbers inside and removing the zeroes from them.
73
- // Arguments : sCalculationString - The string to format.
73
+ // Parameters : sCalculationString - The string to format.
74
74
// Return value: Formatted string.
75
75
//
76
76
std::string FormatStringForDisplay (std::string sCalculationString );
77
77
78
78
// FormatStringForAlgorithm - Formats a calculation string for algorithm use, including changing number formatting to the American notation.
79
- // Arguments : sCalculationString - The string to format.
79
+ // Parameters : sCalculationString - The string to format.
80
80
// Return value: Formatted string.
81
81
//
82
82
std::string FormatStringForAlgorithm (std::string sCalculationString );
@@ -103,28 +103,28 @@ class CalculationAlgorithm
103
103
// Calculate - Main calculation algorithm that calculates using each of the 4 basic mathematical operators,
104
104
// with negative number support along with that. The nErrorLevel variable is modified when
105
105
// anything goes wrong.
106
- // Arguments : sCalculationString - The calculation string to work out the product of/find the answer of.
106
+ // Parameters : sCalculationString - The calculation string to work out the product of/find the answer of.
107
107
// Return values: The calculated answer in long double-grade precision.
108
108
//
109
109
long double Calculate (std::string sCalculationString );
110
110
111
111
// EradicateBrackets - Removes brackets from calculation string and converts them to constant numbers.
112
112
// It has support for numbers before and after the brackets that are attached to the brackets.
113
- // Arguments : sCalculationString - The calculation string to remove and simplify the brackets from.
113
+ // Parameters : sCalculationString - The calculation string to remove and simplify the brackets from.
114
114
// Return values: Modified string
115
115
//
116
116
std::string EradicateBrackets (std::string sCalculationString );
117
117
118
118
// RemoveUnnecessaryArithmeticSymbols - Simplifies/removes arithmetic operators that are placed next to each other,
119
119
// e.g) 5+-++--+-5 simplifies to 5+5
120
- // Arguments : sCalculationString - The calculation string to remove the arithmetic symbols from.
120
+ // Parameters : sCalculationString - The calculation string to remove the arithmetic symbols from.
121
121
// Return values: Modified string
122
122
//
123
123
std::string RemoveUnnecessaryArithmeticSymbols (std::string sCalculationString );
124
124
125
125
// RemoveAllFormatting - Remove spaces/thousands separators from mathematical expression.
126
126
// - Required in case user uses spaces/thousands separators, as spaces/thousands separators will cause unintended syntax errors.
127
- // Arguments : sCalculationString - The calculation string to remove space/thousands separator characters from.
127
+ // Parameters : sCalculationString - The calculation string to remove space/thousands separator characters from.
128
128
// Return values: Modified string
129
129
//
130
130
std::string RemoveAllFormatting (std::string sCalculationString );
@@ -141,7 +141,7 @@ class CalculationAlgorithm
141
141
~CalculationAlgorithm ();
142
142
143
143
// GetLastCalculationErrorInfo - Gets the last calculation error and outputs details as a string.
144
- // Arguments : None
144
+ // Parameters : None
145
145
// Return values: Error information string.
146
146
//
147
147
std::string GetLastCalculationErrorInfo ();
@@ -151,7 +151,7 @@ class CalculationAlgorithm
151
151
// 1) A math error has occured (e.g division by 0).
152
152
// 2) A syntax error has occured.
153
153
// 3) An unknown number parsing error has occured.
154
- // Arguments : None
154
+ // Parameters : None
155
155
// Return values: Last calculation error value.
156
156
//
157
157
inline short int GetLastCalculationErrorValue ()
@@ -162,7 +162,7 @@ class CalculationAlgorithm
162
162
// SafeCalculate - Calculates and finds the product of a calculation string provided by the user,
163
163
// which utilises all features contained in the calculation algorithm to prepare
164
164
// the calculation string for the calculation.
165
- // Arguments : sCalculationString - The string to find the product of/calculate.
165
+ // Parameters : sCalculationString - The string to find the product of/calculate.
166
166
// Return values: The calculated answer in long double-grade precision.
167
167
//
168
168
// NOTE: This function returns 0.0 if any errors occur, and sets the error level accordingly.
0 commit comments