github.com/MangoDowner/go-gm@v0.0.0-20180818020936-8baa2bd4408c/misc/cgo/test/issue9510a/a.go (about)

     1  package issue9510a
     2  
     3  /*
     4  static double csquare(double a, double b) {
     5  	__complex__ double d;
     6  	__real__ d = a;
     7  	__imag__ d = b;
     8  	return __real__ (d * d);
     9  }
    10  */
    11  import "C"
    12  
    13  func F(a, b float64) float64 {
    14  	return float64(C.csquare(C.double(a), C.double(b)))
    15  }