Skip to content

Commit

Permalink
renamed bhaskara to quadratic_roots
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiosvm committed Mar 18, 2024
1 parent 7aad2d9 commit 38f4a25
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/bhaskara.hk → examples/quadratic_roots.hk
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
//
// bhaskara.hk
// quadratic_roots.hk
//

import { sqrt } from math;

fn bhaskara(a, b, c) {
fn quadratic_roots(a, b, c) {
let d = b * b - 4 * a * c;
if (d < 0)
return nil;
Expand All @@ -14,4 +14,4 @@ fn bhaskara(a, b, c) {
return [x1, x2];
}

println(bhaskara(1, 3, 2));
println(quadratic_roots(1, 3, 2));

0 comments on commit 38f4a25

Please sign in to comment.