discontinuedPackage jet_cad_floor_plan has been discontinued and replaced by jet_cad_2d_plan.

strictlyInside function

bool strictlyInside(
  1. Vector2 p,
  2. WorldWall o
)

Whether p lies on o's centreline within wallJoin.linear and more than wallJoin.linear from both of its ends, measured along it (D4.1). Spec 08 D7's T obstacle reads it with the host as o.

Implementation

bool strictlyInside(Vector2 p, WorldWall o) {
  final len = (o.e - o.s).length;
  final u = (p - o.s).dot(o.d);
  if (!(u > wallJoin.linear && u < len - wallJoin.linear)) return false;
  final foot = o.s + o.d * u;
  return (p - foot).length <= wallJoin.linear;
}