newWith method
Creates a new point instance of a type compatible with this object.
Values for a new point are given by required x
and y
values, and
optional z
and z
values as applicable or an implementing class.
When newWith is implemented by the Point class itself or it's descentants then a returned instance must be of the type with same coordinate value members as this object has.
Implementation
@override
Point3m newWith({num x = 0.0, num y = 0.0, num? z, num? m}) =>
Point3m(x: x, y: y, z: z ?? 0.0, m: m ?? 0.0);