Small diamond distance fix

This commit is contained in:
Mark Tolmacs 2024-09-30 16:51:31 +02:00
parent 6e67aa3a3c
commit 1d293b9203
No known key found for this signature in database

View file

@ -131,16 +131,14 @@ const createDiamondSide = (
startRadius: number, startRadius: number,
endRadius: number, endRadius: number,
): Segment<GlobalPoint> => { ): Segment<GlobalPoint> => {
const a = ellipseSegmentInterceptPoints( return segment(
ellipse(s[0], startRadius, startRadius), ellipseSegmentInterceptPoints(
s, ellipse(s[0], startRadius, startRadius),
)[0]; s,
const b = ellipseSegmentInterceptPoints( )[0] ?? s[0],
ellipse(s[1], endRadius, endRadius), ellipseSegmentInterceptPoints(ellipse(s[1], endRadius, endRadius), s)[0] ??
s, s[1],
)[0]; );
return segment(a, b);
}; };
/** /**