jjzjj

selectedPoints

全部标签

go - 函数返回的结构在它所属的数组中没有改变

我正在用Gotk3编写一个小型GUI应用程序,这是我在伪代码中的基本设置:typePointstruct{Xfloat64Yfloat64IsSelectedbool}funcgetClosestElement(pT[]Point,pPoint,maxDistfloat64)Point{/*returnsthepointfrompTwiththeminimumdistancetop*/}funcmain(){//GTKinit..selectedPoints:=make([]Point,0)/*GTK-EventonMouseClick*/{/*ifleftmouseclick*/se