
This is a flat (without history) import of (some of) the content from our markdown module. We've imported this without history because the repo contains our blog posts and showcases posts content prior to porting them to strapi. Since this contains many images, it would balloon the size of this repo to import the full history. Instead, please refer to the history of the (archived) markdown repo at: https://github.com/freesewing/markdown
889 B
889 B
title |
---|
sitsRoughlyOn() |
bool point.sitsRoughlyOn(Point check)
Returns true is the point has roughly the same coordinates as the one you pass to it.
How rough?
The difference between this method and Point.sitsOn is that this one rounds things down to the nearest integer (thus mm) before checking.
let { Point, points, Snippet, snippets } = part.shorthand();
box(part);
let s;
for (let i = 0; i < 10; i++) {
points[`a${i}`] = new Point(i * 10, 40);
points[`b${i}`] = new Point(i * 10, i * 8);
if (points[`a${i}`].sitsRoughlyOn(points[`b${i}`])) s = "notch";
else s = "bnotch";
snippets[`b${i}`] = new Snippet(s, points[`b${i}`]);
snippets[`a${i}`] = new Snippet(s, points[`a${i}`]);
}