Skip to content

Commit

Permalink
edited funtions names in order to pass npm run check
Browse files Browse the repository at this point in the history
  • Loading branch information
jjcapparell committed Oct 9, 2024
1 parent 267c13a commit 5fe9166
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions lesson_06/expression/src/expression_calculator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ export class ExpressionCalculator {
/** Returns the calculation of ((a + b) * c) / d^e */
calculate(a: number, b: number, c: number, d: number, e: number): number {
const adding = this.add(a,b);
const multiply = this.mult(adding,c);
const multiply = this.multiply(adding,c);
const power = this.pow(d,e);
const divide = multiply/power;
return divide;
const div = this.divide(multiply, power);
return div;
}
pow(base: number, exponent: number): number {
const power = Math.pow(base, exponent);
Expand All @@ -15,9 +15,13 @@ export class ExpressionCalculator {
const adding = num1 + num2;
return adding;
}
mult(numA: number, numB: number): number {
const multiply = numA * numB;
return multiply;
multiply(numA: number, numB: number): number {
const mult = numA * numB;
return mult;
}
divide(intA: number, intB: number): number {
const div = intA/intB;
return div;
}
}
//divide(multiply(add(a, b), c), pow(d, e))

0 comments on commit 5fe9166

Please sign in to comment.