discontinuedPackage jet_cad_floor_plan has been discontinued and replaced by jet_cad_2d_plan.

End constructor

End(
  1. WorldWall wall,
  2. int k
)

Implementation

factory End(WorldWall wall, int k) {
  final d = wall.d;
  final a = k == 0 ? d : -d;
  final (l, r) = wall.offsets;
  // The outward-looking left normal is perp(a); at the end (k == 1) it is
  // the wall's right normal, so the faces swap sides and signs.
  return End._(wall, k, a, k == 0 ? l : -r, k == 0 ? r : -l);
}