Point3i.from constructor

Point3i.from(
  1. Iterable<num> coords, {
  2. int? offset,
})

A point from coords given in order x, y, z.

Implementation

factory Point3i.from(Iterable<num> coords, {int? offset}) {
  final start = offset ?? 0;
  return Point3i.xyz(
    coords.elementAt(start).round(),
    coords.elementAt(start + 1).round(),
    coords.elementAt(start + 2).round(),
  );
}