CopyXYZs copies an XYZer.
(data XYZer)
| 212 | |
| 213 | // CopyXYZs copies an XYZer. |
| 214 | func CopyXYZs(data XYZer) (XYZs, error) { |
| 215 | cpy := make(XYZs, data.Len()) |
| 216 | for i := range cpy { |
| 217 | cpy[i].X, cpy[i].Y, cpy[i].Z = data.XYZ(i) |
| 218 | if err := CheckFloats(cpy[i].X, cpy[i].Y, cpy[i].Z); err != nil { |
| 219 | return nil, err |
| 220 | } |
| 221 | } |
| 222 | return cpy, nil |
| 223 | } |
| 224 | |
| 225 | // XYValues implements the XYer interface, returning |
| 226 | // the x and y values from an XYZer. |
nothing calls this directly
no test coverage detected