| 1 | // vtest build: false // Check the README.md for detailed information; this file needs special compilation options |
| 2 | module test_math |
| 3 | |
| 4 | import math |
| 5 | |
| 6 | @[export: 'square'] |
| 7 | fn calculate_square(i int) int { |
| 8 | return i * i |
| 9 | } |
| 10 | |
| 11 | @[export: 'sqrt_of_sum_of_squares'] |
| 12 | fn calculate_sqrt_of_sum_of_squares(x f64, y f64) f64 { |
| 13 | return math.sqrt(x * x + y * y) |
| 14 | } |
| 15 |