You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// NewXYs returns an XYs that is a combination of the x, y Valuer,// or an error if x's length is not equal to y's.funcNewXYs(x, yValuer) XYs {
ifx.Len() !=y.Len() {
panic(fmt.Errorf("Len mismatch, %d != %d", x.Len(), y.Len()))
}
xys:=make(XYs, x.Len())
fori:=rangexys {
xys[i].X, xys[i].Y=x.Value(i), y.Value(i)
}
returnxys
}
The text was updated successfully, but these errors were encountered:
Adding this function will be more convenient.
An Example of func NewXYs
The text was updated successfully, but these errors were encountered: