mirror of
https://github.com/vlang/v.git
synced 2025-09-08 14:51:53 -04:00
15 lines
343 B
V
15 lines
343 B
V
// vtest build: false // Check the README.md for detailed information; this file needs special compilation options
|
|
module test_math
|
|
|
|
import math
|
|
|
|
@[export: 'square']
|
|
fn calculate_square(i int) int {
|
|
return i * i
|
|
}
|
|
|
|
@[export: 'sqrt_of_sum_of_squares']
|
|
fn calculate_sqrt_of_sum_of_squares(x f64, y f64) f64 {
|
|
return math.sqrt(x * x + y * y)
|
|
}
|