valuesFlat method

  1. @override
Iterable<double> valuesFlat([
  1. Coords? type
])
override

Coordinate (double) values of points (of type) as a flat structure.

If type is not given, then Coords.xy coordinates are returned.

Implementation

@override
Iterable<double> valuesFlat([Coords? type]) sync* {
  for (final point in this) {
    yield point.x.toDouble();
    yield point.y.toDouble();
    if (type != null) {
      if (type.is3D) {
        yield point.z.toDouble();
      }
      if (type.isMeasured) {
        yield point.m.toDouble();
      }
    }
  }
}