8 lines
No EOL
147 B
PSL
8 lines
No EOL
147 B
PSL
foreign func sin(x: f64) -> f64
|
|
foreign func cos(x: f64) -> f64
|
|
|
|
func test(x: f64) -> f64 {
|
|
let s = sin(x)
|
|
let c = cos(x)
|
|
return s * s + c * c
|
|
} |