Skip to content

Commit

Permalink
Replace panic with vsl_panic in eval function (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
suleyman-kaya authored Aug 2, 2024
1 parent 8157297 commit b691246
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion poly/poly.v
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
module poly

import math
import vsl.errors

const radix = 2
const radix2 = (radix * radix)

pub fn eval(c []f64, x f64) f64 {
if c.len == 0 {
panic('coeficients can not be empty')
errors.vsl_panic('coeficients can not be empty', .efailed)
}
len := c.len
mut ans := c[len - 1]
Expand Down

0 comments on commit b691246

Please sign in to comment.