package main
import "C"
// Global variables
var (
In float64 = 1.0
Out float64 = 0.0
G float64 = 2.0
)
//export Step
func Step() {
Out = G * In
}
//export GetIn
func GetIn() float64 {
return In
}
//export SetIn
func SetIn(value float64) {
In = value
}
//export GetOut
func GetOut() float64 {
return Out
}
//export GetG
func GetG() float64 {
return G
}
//export SetG
func SetG(value float64) {
G = value
}
func main() {
// This is required for main in shared libraries, but won’t be executed when called from C
}