Resources Numerical accuracy
Comparison changes
Every equality comparison that was read and then fixed or left as it is, newest first. Each entry keeps the code before and after, the tolerance, the reason and the time, so any change can be put back. Edits are made in the lab build only; a released build changes when the owner releases.
Changes
-
Fixed EQ-0284 · cadcraft/addons/windows/lib/cutlist/cutlist.js:86 · In the lab build
Two cabinet parts of the same size were only merged into one cut-list row if their sizes matched bit for bit. Sizes that come out of a calculation could differ by a hair and stay as separate rows. They now merge when they agree to within one part in a billion.
Before
a.thickness === b.thickness && a.length === b.length && a.width === b.width &&After
near(a.thickness, b.thickness) && near(a.length, b.length) && near(a.width, b.width) &&Part sizes can come from calculated frame sizes, so two parts that are the same size can differ in the last bits. Tolerance: 1e-9 relative. 1 identical copy changed together. To put it back:
node tools/accuracy-equality/fix.mjs revert EQ-0284. -
Code, not a measurement EQ-0283 · takeoffcraft/supply.js:99 · Read, left as it is
Checks the saved supply data is file-format version 1.
Before
json.v !== 1format version code.
-
Code, not a measurement EQ-0282 · takeoffcraft/prices.js:31 · Read, left as it is
Checks the saved prices are file-format version 1.
Before
json.v !== 1format version code.
-
Copied value EQ-0281 · takeoffcraft/model.js:935 · Read, left as it is
Keeps only marks in the chosen bid area, comparing area ids (names), not measured numbers.
Before
(m.area || null) !== areaArea ids.
-
Copied value EQ-0280 · takeoffcraft/model.js:641 · Read, left as it is
Skips marks already in the wanted bid area, comparing area ids (names), not measured numbers.
Before
(m.area || null) === (area || null)Area ids.
-
Needs a second look EQ-0279 · takeoffcraft/match.js:170 · Read, left as it is
Among equal match scores, picks one winner so a flat patch yields one peak. Scores are calculated, but only identical scores form a tie here, and a tolerance would change which peaks are found.
Before
u === v && (dy < 0Plateau tie-break in peak search.
-
Copied value EQ-0278 · takeoffcraft/fixedqty.js:76 · Read, left as it is
Decides whether an imported quantity is the same as the stored one, to count it as unchanged. Both come from saved files, not new calculation.
Before
old.qty === q.qtyStored vs file value.
-
Code, not a measurement EQ-0277 · takeoffcraft/carbon.js:32 · Read, left as it is
Checks the saved carbon data is file-format version 1.
Before
json.v !== 1) return null; const cformat version code.
-
Code, not a measurement EQ-0276 · assets/js/live-crypto.js:329 · Read, left as it is
Checks the signed claims are format version 1.
Before
claims.v !== 1format version code.
-
Exact by construction EQ-0275 · assets/js/engines/plc/std.js:78 · Read, left as it is
Rounds half-way values to the even whole number. Finding exactly one half is exact in binary.
Before
Math.abs(x % 1) === 0.5x%1 is exact; 0.5 is a power of two.
-
Copied value EQ-0274 · assets/js/engines/pcb/place.js:33 · Read, left as it is
Detects that all parts sit at the identical starting spot, so they can be spread out. They start with the same copied position.
Before
p.x === free[0].x && p.y === free[0].yIdentical start positions.
-
Needs a second look EQ-0273 · assets/js/engines/des/engine.js:34 · Read, left as it is
Orders events by time, then priority, then arrival order. Times are calculated, but a tolerance inside an ordering rule could make the order inconsistent, so exact is kept and flagged. Live site.
Before
x.t === y.t && (x.pr < y.prSort comparator; tolerance can break strict weak ordering.
-
Zero guard EQ-0272 · assets/js/calc.js:347 · Read, left as it is
Stops with a division by zero message when the divisor is exactly zero.
Before
if (b.v === 0) failDivision guard.
-
Waiting for a release EQ-0271 · assets/js/calc.js:240 · Read, left as it is
A unit power is shown without its exponent when it is exactly one. A power built from fractions could be a hair off one and show an odd number. This is on the live site, so left for now.
Before
Math.abs(x) === 1 ? ''Computed exponent; needs tolerance; site is live.
-
Whole numbers EQ-0270 · assets/js/app-panels.js:1336 · Read, left as it is
Opens a pop-up at a saved screen position unless the saved left edge is zero. Screen positions are whole pixels.
Before
q.x !== 0) f +=Pixel coordinates.
-
Zero guard EQ-0269 · assets/js/app-devices.js:216 · Read, left as it is
Recognises sideways wheel tilt when there is no up-down movement. The browser reports exact zero for none.
Before
if (dy === 0 && Number.isInteger(dx)Browser delta of exactly 0.
-
Zero guard EQ-0268 · assets/js/app-devices.js:214 · Read, left as it is
Treats a mouse wheel as a notched wheel when there is no sideways movement. The browser reports exact zero for none.
Before
const step = dx === 0Browser delta of exactly 0.
-
Code, not a measurement EQ-0267 · assets/js/addon-license.js:50 · Read, left as it is
Checks the license data is format version 1.
Before
payload.v !== 1format version code (site: live).
-
Code, not a measurement EQ-0266 · partcraft/tetmesh.js:574 · Read, left as it is
Skips a cut when the cutting routine gave back its "no cut" code of zero. That is a fixed signal, not a measurement.
Before
if (c.t === 0) continue;Literal sentinel 0 returned by cutPoint.
-
Still the default EQ-0265 · partcraft/swmacro.js:1569 · Read, left as it is
Adds a unit multiplier to the formula only when the factor is not the plain one. A factor that is nearly one would just add a harmless multiplier.
Before
info.factor !== 1Factor 1 means no conversion.
-
Code, not a measurement EQ-0264 · partcraft/sim.js:97 · Read, left as it is
Checks the saved study is file-format version 1.
Before
raw.v !== 1) bad(t('study.sim.err.bad_gen')format version code.
-
Code, not a measurement EQ-0263 · partcraft/sim.js:80 · Read, left as it is
Checks the saved study is file-format version 1.
Before
raw.v !== 1) bad(t('study.sim.err.bad_study')format version code.
-
Zero guard EQ-0262 · partcraft/magnet-study.js:172 · Read, left as it is
Counts a coil as a source only if its typed current is not zero.
Before
Number(s.current) !== 0Typed value; exactly zero means off.
-
Exact by construction EQ-0261 · partcraft/illustrate/anim.js:467 · Read, left as it is
Merges animation keys landing at the same time. Times are rounded to the same thousandth, so equal times are equal numbers.
Before
last && last.t === k.tTimes rounded with r3.
-
Exact by construction EQ-0260 · partcraft/illustrate/anim.js:129 · Read, left as it is
Merges animation keys at the same time. Times are rounded to the same thousandth, so equal times are equal numbers.
Before
out[out.length - 1].t === k.t) out[out.length - 1] = kTimes rounded with r3.
-
Copied value EQ-0259 · partcraft/hydrostatics.js:136 · Read, left as it is
Uses the mesh as is when the heel angle is the typed value zero, instead of tilting it.
Before
ang === 0 ? meshAngle comes from the given list, zero stays exact.
-
Code, not a measurement EQ-0258 · partcraft/flow-study.js:82 · Read, left as it is
Checks the saved study is file-format version 1.
Before
raw.v !== 1) bad(t('study.flow.err.bad_study')format version code.
-
Zero guard EQ-0257 · partcraft/cs-tensor.js:181 · Read, left as it is
The script's "not" turns exactly zero into true. That is the defined meaning.
Before
A.x === 0 : A.xLogical not semantics.
-
Zero guard EQ-0256 · partcraft/cs-lib-linalg.js:536 · Read, left as it is
Takes the special path when a row is entirely zeros. Only exact zeros are meant.
Before
if (scale === 0) {Sum of abs values is 0 only when all are 0.
-
Whole numbers EQ-0255 · partcraft/contact.js:159 · Read, left as it is
Notes whether the closest triangle changed, by its number in the list.
Before
old.t !== best.tt is a triangle index.
-
Still the default EQ-0254 · partcraft/bodies-ui.js:225 · Read, left as it is
Checks whether the three scale factors are still the untouched default of one before copying the single scale into them.
Before
g.sx === 1 && g.sy === 1 && g.sz === 1Still default 1.
-
Zero guard EQ-0253 · partcraft/3dm/tess.js:245 · Read, left as it is
Drops a triangle that has no area at all. Only a truly flat one is skipped.
Before
len(n) === 0Degenerate triangle skip.
-
Zero guard EQ-0252 · partcraft/3dm/geom.js:155 · Read, left as it is
Treats the curve as a closed loop when its two ends are exactly the same point, then splits it further. If the ends differ even slightly the other checks already split it.
Before
dist(pa, pb) === 0Mirrors chordDev L===0 guard; other conditions catch near-closed.
-
Zero guard EQ-0251 · partcraft/3dm/earcut.js:248 · Read, left as it is
Skips a level edge so the next line never divides by zero.
Before
&& p.next.y !== p.y && (px <Division guard.
-
Copied value EQ-0250 · partcraft/3dm/earcut.js:218 · Read, left as it is
Checks whether two outline points are the same point, as stored.
Before
const equals = (p1, p2) => p1.x === p2.x && p1.y === p2.yIdentity of stored vertices.
-
Copied value EQ-0249 · partcraft/3dm/earcut.js:195 · Read, left as it is
Finds the left-most point, breaking ties on equal x. The values are stored coordinates, not results of calculation.
Before
p.x === leftmost.x && p.y < leftmost.yCompares stored coordinates.
-
Needs a second look EQ-0248 · partcraft/3dm/earcut.js:180 · Read, left as it is
Breaks a tie between two equally good hole bridges. The slope is calculated, but this only picks between equals in a standard routine, and a tolerance would change which one wins.
Before
tan === tanMin && (p.x > m.xPorted earcut tie-break; tolerance could alter determinism.
-
Zero guard EQ-0247 · partcraft/3dm/earcut.js:162 · Read, left as it is
Skips a level edge so the next line never divides by zero.
Before
hy >= p.next.y && p.next.y !== p.yDivision guard.
-
Zero guard EQ-0246 · partcraft/3dm/earcut.js:52 · Read, left as it is
Removes a corner only when the three points lie on an exactly straight line. This is the standard triangulation routine and exact is its intended behaviour.
Before
area(p.prev, p, p.next) === 0Ported earcut; degenerate-collinear test.
-
Exact by construction EQ-0245 · modelcraft/tools.js:1576 · Read, left as it is
Marks which directions a grip moves in. The positions come from a fixed list of 0, 0.5 and 1, which are exact.
Before
x !== 0.5 && live[a]Values are literals 0, 0.5, 1.
-
Exact by construction EQ-0244 · modelcraft/tools.js:1575 · Read, left as it is
Skips the grip in the middle of the box. The positions come from a fixed list of 0, 0.5 and 1, which are exact.
Before
f.every((x) => x === 0.5)Values are literals 0, 0.5, 1.
-
Zero guard EQ-0243 · modelcraft/tools.js:1147 · Read, left as it is
Falls back to a scale of one if the scale calculation would blow up. It only matters for the degenerate case, not for near matches.
Before
1 / Math.max(len(this.T.localDir(this.n)), 1e-9) === 0Guard against infinity; the max(...,1e-9) already prevents zero.
-
Code, not a measurement EQ-0242 · modelcraft/tools.js:1060 · Read, left as it is
Checks whether the clicked item is already part of the selection, comparing kind and id.
Before
const inSel = this.h.sel.some((x) => x.t === s.tt is a type string.
-
Zero guard EQ-0241 · modelcraft/tools.js:727 · Read, left as it is
Ignores a typed angle of zero, since turning by nothing does nothing.
Before
!Number.isFinite(deg) || deg === 0Only exact 0 typed means no rotation.
-
Copied value EQ-0240 · modelcraft/timeline.js:337 · Read, left as it is
Finds the animation key that was picked, by the time it was copied from.
Before
ks.find((x) => x.t === p.t)p.t copied from the key.
-
Copied value EQ-0239 · modelcraft/timeline.js:305 · Read, left as it is
Keeps a chosen animation key only if a key at the same time still exists. The chosen time was copied from a key.
Before
keysOf(p.track).some((k) => k.t === p.t)p.t copied from the key.
-
Whole numbers EQ-0238 · modelcraft/skp/messages.js:160 · Read, left as it is
Chooses singular or plural wording from a count. Counts are whole numbers.
Before
Number(fills.n) === 1n is a count.
-
Zero guard EQ-0237 · modelcraft/nurbs/trim.js:210 · Read, left as it is
Skips a perfectly level edge so the next line never divides by zero.
Before
if (a.y === b.y) continue;Division guard.
-
Copied value EQ-0236 · modelcraft/nurbs/trim.js:209 · Read, left as it is
Decides whether an outline edge touches the starting point's height. The starting point is one of the outline's own points, so the heights are the same stored numbers.
Before
!(a.y === M.y || b.y === M.y)M is a ring vertex; comparing copied coordinates.
-
Copied value EQ-0235 · modelcraft/nurbs/trim.js:163 · Read, left as it is
Checks whether two outline points are the very same point, taken from the same list of points.
Before
a.x === b.x && a.y === b.yIdentity of points copied from the same ring.
-
Whole numbers EQ-0234 · modelcraft/nurbs/step.js:608 · Read, left as it is
Uses a curve's own points when it is a straight-line polyline. The degree is a whole number.
Before
c.deg === 1 ? c.cvs.slice()degree is an integer.
-
Whole numbers EQ-0233 · modelcraft/nurbs/iges.js:270 · Read, left as it is
Treats a curve of degree one as a straight-line polyline. The degree is a whole number.
Before
c.deg === 1 && !c.w) return c.cvs.slicedegree is an integer.
-
Whole numbers EQ-0232 · modelcraft/nurbs/iges.js:255 · Read, left as it is
Treats a curve of degree one as a straight-line polyline. The degree is a whole number.
Before
c.deg === 1 && !c.w) return c.cvs.mapdegree is an integer.
-
Zero guard EQ-0231 · modelcraft/nurbs/construct.js:86 · Read, left as it is
Refuses to spin a shape around an axis that has no direction at all. Only a truly empty direction counts.
Before
V.len(Z) === 0Guards a zero-length axis after normalising.
-
Code, not a measurement EQ-0230 · modelcraft/modelcraft.js:1232 · Read, left as it is
Compares the kind of the clicked thing (a name like face or edge) with what is already selected.
Before
x.t === s.t && x.id === s.id)) host.setSelt is a type string.
-
Zero guard EQ-0229 · modelcraft/modelcraft.js:922 · Read, left as it is
Only moves the camera when the two-finger touch has actually shifted. If the shift is exactly nothing the move would be nothing anyway, so a tiny tolerance adds nothing.
Before
c.x !== pinch.c.x || c.y !== pinch.c.ySkips a zero-size camera move; harmless either way.
-
Whole numbers EQ-0228 · modelcraft/model.js:538 · Read, left as it is
Skips a step when two neighbouring stops are the same point, compared by their point numbers.
Before
stops[i].v === stops[i + 1].vvertex indexes.
-
Whole numbers EQ-0227 · modelcraft/model.js:137 · Read, left as it is
Reuses a cached shape only if the mesh has not been edited, judged by an edit counter.
Before
g.v === mesh.vversion counter.
-
Code, not a measurement EQ-0226 · modelcraft/model-info.js:58 · Read, left as it is
Checks the saved template is the file-format version 1. A version label, so exact is right.
Before
v.v !== 1format version code.
-
Whole numbers EQ-0225 · modelcraft/mesh/sculpt-tool.js:33 · Read, left as it is
Checks whether the mesh changed since the sculpt tool last looked, using an edit counter.
Before
this.S.v !== m.vv is a version counter.
-
Whole numbers EQ-0224 · modelcraft/mesh/pick.js:23 · Read, left as it is
Checks whether the mesh has been edited since it was last read, using an edit counter. Whole numbers, so exact is right.
Before
this.v === this.mesh.vv is a version counter.
-
Whole numbers EQ-0223 · modelcraft/mesh/ops.js:920 · Read, left as it is
Checks whether two neighbouring points are the same point by their number in the list, not by a measurement.
Before
dirs[dirs.length - 1].w === dirs[0].ww are vertex indexes.
-
Whole numbers EQ-0222 · modelcraft/mesh/ops.js:773 · Read, left as it is
Checks whether two cut corners of a face are neighbours, using corner positions that are whole numbers.
Before
Math.abs(on[0] - on[1]) !== 1Index difference.
-
Still the default EQ-0221 · modelcraft/io/pbr.js:107 · Read, left as it is
Writes a refraction setting only when it differs from the standard default of 1.5. The default is exactly representable.
Before
p.specular_ior !== 1.51.5 exact in binary; default check.
-
Zero guard EQ-0220 · modelcraft/io/3dm/tess.js:245 · Read, left as it is
Skips a triangle only when its area is exactly zero in both flat and 3D form. A tiny but real triangle must still be kept.
Before
if (ar === 0) {Exact degenerate triangle test; tolerance would drop real sliver triangles.
-
Zero guard EQ-0219 · modelcraft/io/3dm/geom.js:155 · Read, left as it is
Detects a curve piece whose two ends sit at exactly the same point (a closed loop), so it is split further. Only an exact match is meant.
Before
dist(pa, pb) === 0Zero chord length guard.
-
Zero guard EQ-0218 · modelcraft/io/3dm/earcut.js:248 · Read, left as it is
Skips flat edges so the next line does not divide by zero. Exact is the right guard.
Before
p.next.y !== p.y && (pxGuards division.
-
Copied value EQ-0217 · modelcraft/io/3dm/earcut.js:218 · Read, left as it is
Checks whether two points of the shape are the very same point, as given in the input. Exact is intended.
Before
p1.x === p2.x && p1.y === p2.yDuplicate-vertex test on input.
-
Copied value EQ-0216 · modelcraft/io/3dm/earcut.js:195 · Read, left as it is
Picks the left-most point, breaking ties by height. The coordinates are the supplied input values, so exact comparison is right.
Before
p.x === leftmost.x && p.y < leftmost.yCompares input vertex coordinates.
-
Needs a second look EQ-0215 · modelcraft/io/3dm/earcut.js:180 · Read, left as it is
Breaks ties between equal angles when joining a hole to a shape. This is the standard, tested triangulation method, so we leave it exact; a loose match could change which bridge is chosen.
Before
tan === tanMin &&Vendored earcut tie-break; behaviour-sensitive.
-
Zero guard EQ-0214 · modelcraft/io/3dm/earcut.js:162 · Read, left as it is
Skips flat edges so the next line does not divide by zero. Exact is the right guard.
Before
p.next.y !== p.y) {Guards division by (p.next.y - p.y).
-
Zero guard EQ-0213 · modelcraft/io/3dm/earcut.js:52 · Read, left as it is
Removes a triangle with exactly zero area when cutting a shape into triangles. This is the intended behaviour of the standard method, so it stays.
Before
area(p.prev, p, p.next) === 0Vendored earcut: exact degenerate test is intended.
-
Zero guard EQ-0212 · modelcraft/earcut.js:247 · Read, left as it is
Skips flat edges so the next line does not divide by zero. Exact is the right guard.
Before
p.next.y !== p.y && (pxGuards division.
-
Copied value EQ-0211 · modelcraft/earcut.js:217 · Read, left as it is
Checks whether two points of the shape are the very same point, as given in the input. Exact is intended.
Before
p1.x === p2.x && p1.y === p2.yDuplicate-vertex test on input.
-
Copied value EQ-0210 · modelcraft/earcut.js:194 · Read, left as it is
Picks the left-most point, breaking ties by height. The coordinates are the supplied input values, so exact comparison is right.
Before
p.x === leftmost.x && p.y < leftmost.yCompares input vertex coordinates.
-
Needs a second look EQ-0209 · modelcraft/earcut.js:179 · Read, left as it is
Breaks ties between equal angles when joining a hole to a shape. This is the standard, tested triangulation method, so we leave it exact; a loose match could change which bridge is chosen.
Before
tan === tanMin &&Vendored earcut tie-break; behaviour-sensitive, tolerance could change output.
-
Zero guard EQ-0208 · modelcraft/earcut.js:161 · Read, left as it is
Skips flat edges so the next line does not divide by zero. Exact is the right guard.
Before
p.next.y !== p.y) {Guards division by (p.next.y - p.y).
-
Zero guard EQ-0207 · modelcraft/earcut.js:51 · Read, left as it is
Removes a triangle with exactly zero area when cutting a shape into triangles. This is the intended behaviour of the standard method, so it stays.
Before
area(p.prev, p, p.next) === 0Vendored earcut: exact degenerate test is intended.
-
Whole numbers EQ-0206 · modelcraft/anim/rig-view.js:190 · Read, left as it is
Rebuilds the sculpting helper when the mesh version counter changed. Counters are whole numbers.
Before
this.S.v !== m.vVersion counter.
-
Copied value EQ-0205 · modelcraft/anim/curves-ui.js:255 · Read, left as it is
Finds the animation key at the time that was handed over. That time was copied from the key itself, so exact matching is right.
Before
k.t === s.tKey lookup by copied time.
-
Whole numbers EQ-0204 · modelcraft/addons/twin/main.js:89 · Read, left as it is
Checks whether the cached shape is still the same version as the part, using a version counter. Counters are whole numbers.
Before
c.v === part.mesh.vVersion counter.
-
Zero guard EQ-0203 · modelcraft/addons/flow/lib/plc-mode.js:76 · Read, left as it is
Reports an error when the scale is exactly zero, which would make every value zero. Only zero is meant.
Before
r.scale !== 0)) out.pushZero scale guard.
-
Zero guard EQ-0202 · modelcraft/addons/flow/lib/plc-mode.js:35 · Read, left as it is
Replaces a scale of exactly zero with 1 so values are not wiped out. Only zero is meant.
Before
Number(x.scale) !== 0 ? Number(x.scale) : 1Zero scale guard.
-
Copied value EQ-0201 · markupcraft/stroke-clean.js:143 · Read, left as it is
Checks whether the angle-snapping step changed the stroke angle. When it does not snap, it hands back the very same number, so exact comparison tells us whether snapping happened.
Before
const sq = ang !== Math.atan2squareAngle returns input unchanged when not snapping; identity test.
-
Code, not a measurement EQ-0200 · markupcraft/records.js:156 · Read, left as it is
Checks the records format version is 1. It is a whole-number code.
Before
v.v !== 1Format version code.
-
Code, not a measurement EQ-0199 · markupcraft/pdf-read.js:146 · Read, left as it is
Checks the private markup format version is 1. It is a whole-number code.
Before
d.v !== 1Format version code.
-
Code, not a measurement EQ-0198 · markupcraft/markupcraft.js:4635 · Read, left as it is
Checks the saved-recovery format version is 1. It is a whole-number code.
Before
st.v !== 1Format version code.
-
Code, not a measurement EQ-0197 · markupcraft/content-clip.js:86 · Read, left as it is
Checks the clipboard format version is 1. It is a whole-number code.
Before
d.v !== 1Format version code.
-
Code, not a measurement EQ-0196 · markupcraft/clip.js:83 · Read, left as it is
Checks the clipboard format version is 1. It is a whole-number code.
Before
d.v !== 1Format version code.
-
Exact by construction EQ-0195 · markupcraft/base-ui.js:580 · Read, left as it is
Detects the axis that is not being stretched, which the code set to exactly 1. That is a stored literal, not a calculated value.
Before
sx === 1 && !grip.key.matchsx set to literal 1 when axis unused.
-
Whole numbers EQ-0194 · detailcraft/rc/elements.js:154 · Read, left as it is
Checks whether a number of faces is one or two. It is a whole number.
Before
Number(e.faces) === 1Integer count.
-
Code, not a measurement EQ-0193 · detailcraft/lib-supply/supply.js:115 · Read, left as it is
Checks the file format version number is 1 before reading supply data. It is a whole-number code.
Before
json.v !== 1Format version code.
-
Exact by construction EQ-0192 · detailcraft/dwg/objects-write.js:818 · Read, left as it is
Decides whether a curve is weighted by looking for weights other than the default 1. The default is exact.
Before
const rational = ctl.some((p) => p.w !== undefined && p.w !== 1);Weight default 1 is exact.
-
Exact by construction EQ-0191 · detailcraft/dwg/objects-write.js:774 · Read, left as it is
Decides whether a curve needs to store weights, by checking for any that differ from the default 1. The default is exact.
Before
ctrl.some((p) => p.w !== undefined && p.w !== 1) || (r.weightsWeight default 1 is exact.
-
Exact by construction EQ-0190 · detailcraft/dwg/objects-write.js:660 · Read, left as it is
Picks a file layout when the x scale is the default 1. A near miss simply uses the full layout, which loses nothing.
Before
else if (sx === 1) {1 exact; fallback lossless.
-
Copied value EQ-0189 · detailcraft/dwg/objects-write.js:659 · Read, left as it is
Chooses a shorter way to save a block insert whose three scales are the same typed value. If not exactly equal, the full form is used, which loses nothing.
Before
else if (sx === sy && sx === sz)Storage-format choice, lossless fallback.
-
Exact by construction EQ-0188 · detailcraft/dwg/objects-write.js:658 · Read, left as it is
Chooses the compact way to save a block insert when the scale is the plain default of 1. The value 1 is exact, and a near miss just uses the longer form.
Before
if (sx === 1 && sy === 1 && sz === 1)1 is exact in binary; fallback is lossless.
-
Copied value EQ-0187 · civilcraft/point-edit.js:74 · Read, left as it is
Finds breakline vertices that sat exactly on the old point so they move with it. They are copies of that point, so exact matching is needed.
Before
if (v.x !== old.x || v.y !== old.y) continue;Key match on copied coordinates.
-
Copied value EQ-0186 · civilcraft/point-edit.js:68 · Read, left as it is
Works out whether the point actually moved, by comparing the new typed values with the old stored ones. Exact is intended.
Before
const moved = point.x !== old.xDid-it-change check.
-
Copied value EQ-0185 · civilcraft/point-edit.js:59 · Read, left as it is
Checks whether an edited survey point is identical to what it was before, to skip a no-change edit. Compares typed values with stored ones, so it stays exact.
Before
next.n === old.n && next.x === old.xNo-change check vs stored copy.
-
Copied value EQ-0184 · civilcraft/platform.js:123 · Read, left as it is
Drops a section line whose points are all the same point. The points are copies of the supplied input, so exact comparison is right.
Before
p.x === line[0].x && p.y === line[0].yDegenerate-line check on input copies.
-
Zero guard EQ-0183 · civilcraft/landxml.js:448 · Read, left as it is
Treats a curve radius of zero or infinity as a straight line when reading a survey file. Only an exact zero from the file is meant.
Before
|| Number(v) === 0;Typed zero radius means straight.
-
Copied value EQ-0182 · civilcraft/ground-surface.js:69 · Read, left as it is
Checks whether a contour line already ends where it starts, so it only closes the ring if it does not. Both points are copies of the same data, so exact matching is right.
Before
l.pts[0].x !== l.pts[l.pts.length - 1].xClosed-ring check on copied points.
-
Copied value EQ-0181 · civilcraft/gis-poly.js:155 · Read, left as it is
Compares two stored polygon references to see whether the neighbouring shape changed along an edge. They are copies of the same values, so exact matching stays.
Before
if (prev && prev.v !== s.v) subs.pushIdentity of stored ids/objects.
-
Zero guard EQ-0180 · civilcraft/gis-cad-ui.js:207 · Read, left as it is
Checks whether all placed blocks sit at exactly zero height, meaning a flat 2D drawing. Exact zero is intended.
Before
every((x) => x.z === 0)Zero elevation means 2D.
-
Zero guard EQ-0179 · civilcraft/gis-cad-ui.js:171 · Read, left as it is
Treats an elevation of exactly zero as no elevation given. That is the intended meaning, so it stays.
Before
x.z !== 0 ? x.z : nullZero means unset elevation.
-
Zero guard EQ-0178 · civilcraft/gis-analysis.js:326 · Read, left as it is
Rejects a buffer distance of exactly zero. Only zero is meant, so it stays.
Before
dist !== 0Zero guard on typed distance.
-
Zero guard EQ-0177 · civilcraft/geotech.js:230 · Read, left as it is
Avoids dividing by zero when two neighbouring points sit at the same position. Exact equality is the right guard.
Before
b.x === a.x ? b.zGuards division by (b.x - a.x).
-
Zero guard EQ-0176 · civilcraft/featureline.js:228 · Read, left as it is
Refuses an offset distance of exactly zero, because that would not move the line. Only exact zero is meant, so it stays.
Before
dist === 0Zero offset guard.
-
Code, not a measurement EQ-0175 · civilcraft/clip.js:49 · Read, left as it is
Checks the file format version number is 1 before reading pasted data. It is a whole-number code, so it stays.
Before
obj.v !== 1Format version code.
-
Whole numbers EQ-0174 · civilcraft/addons/pointcloud/surface-ui.js:174 · Read, left as it is
Picks every fifth contour line to draw thicker. The value is already rounded to a whole number, so exact comparison is safe.
Before
=== 0; g.lineWidth = majorMath.round result is an integer.
-
Zero guard EQ-0173 · cadcraft/wheel-pad.js:22 · Read, left as it is
Same swipe-detection test: any sideways movement at all means a trackpad. It stays exact.
Before
if (dx !== 0 || !Number.isInteger(dy)Exact zero of device delta.
-
Zero guard EQ-0172 · cadcraft/wheel-pad.js:20 · Read, left as it is
Tells a mouse wheel click from a trackpad swipe by whether there is any sideways movement at all. Only exactly none counts, so it stays.
Before
const step = dx === 0 &&Exact zero means no sideways delta.
-
Copied value EQ-0171 · cadcraft/walls-cmd.js:182 · Read, left as it is
Checks whether a wall-hosted item has changed compared with its stored version. It compares stored values, so exact matching is what we want.
Before
a.x === b.x && a.y === b.yDid-it-change check on stored fields.
-
Copied value EQ-0170 · cadcraft/view.js:373 · Read, left as it is
Checks whether the view saved earlier differs from the live view. Both are copies of the same stored numbers, so an exact check is right.
Before
b.cx !== vp.cxCompares stored copy to live value; no arithmetic.
-
Still the default EQ-0169 · cadcraft/usd/usda-write.js:172 · Read, left as it is
Writes a layer offset only if it differs from the untouched defaults.
Before
if (o && (o.offset !== 0 || o.scale !== 1)) parts.pushdefault detection
-
Still the default EQ-0168 · cadcraft/usd/usda-write.js:47 · Read, left as it is
Writes the scale only if it differs from the untouched default of 1.
Before
if (o.scale !== 1) parts.pushdefault detection
-
Still the default EQ-0167 · cadcraft/usd/usda-write.js:40 · Read, left as it is
Checks whether a layer offset is still the untouched default (0 and 1), so it is only written when changed.
Before
o && (o.offset !== 0 || o.scale !== 1) ? ' ('default detection
-
Zero guard EQ-0166 · cadcraft/usd/usda-read.js:476 · Read, left as it is
Reads a number as true or false: zero means false. Only an exact zero is meant.
Before
return c.v !== 0;bool from number
-
Code, not a measurement EQ-0165 · cadcraft/usd/geom.js:92 · Read, left as it is
Compares the data type names of two animation keys; they are labels, not numbers.
Before
a.t !== b.ttype string compare
-
Zero guard EQ-0164 · cadcraft/usd/earcut.js:248 · Read, left as it is
Skips exactly level edges so the next part does not divide by zero.
Before
) && p.next.y !== p.y && (px <division guard in earcut
-
Copied value EQ-0163 · cadcraft/usd/earcut.js:218 · Read, left as it is
Tests whether two outline points are the very same stored point. They are copies, so exact is intended.
Before
p1.x === p2.x && p1.y === p2.yidentity of stored points
-
Copied value EQ-0162 · cadcraft/usd/earcut.js:195 · Read, left as it is
Finds the left-most point, using the stored position to break ties. Exact comparison of stored coordinates is intended.
Before
p.x === leftmost.xtie-break on stored coordinates
-
Copied value EQ-0161 · cadcraft/usd/earcut.js:180 · Read, left as it is
Breaks ties between candidate points that have the identical stored position. Points are copies of the same inputs, and the standard algorithm needs exact ties.
Before
p.x === m.x &&tie-break on identical stored coordinates
-
Zero guard EQ-0160 · cadcraft/usd/earcut.js:162 · Read, left as it is
Skips edges that are exactly level so the next line does not divide by zero. Only a true zero must be skipped.
Before
p.next.y !== p.y) { const xdivision guard in earcut
-
Zero guard EQ-0159 · cadcraft/usd/earcut.js:52 · Read, left as it is
Drops a corner point when three neighbouring points lie exactly on one line. This is the standard exact test of the well-known triangulation method, and loosening it could remove real corners.
Before
area(p.prev, p, p.next) === 0upstream earcut exact collinear test
-
Copied value EQ-0158 · cadcraft/unit-table.js:126 · Read, left as it is
Returns the value unchanged when two units share the same stored conversion factor. The factors are fixed table entries, so an exact match is what is meant; a near miss just takes the normal route.
Before
a === b || a.factor === b.factortable constants
-
Copied value EQ-0157 · cadcraft/sketch.js:143 · Read, left as it is
Checks whether the straightening step changed the stroke angle. It compares against the same angle value it started from, so exact is intended.
Before
const sq = ang !== Math.atan2(last.y - first.y, last.x - first.x)did-change check against the unsnapped value
-
Zero guard EQ-0156 · cadcraft/redline.js:80 · Read, left as it is
Refuses a drawing whose overall extent is exactly flat in either direction, since no frame can be made. Only an exact zero size is meant.
Before
b.maxX === b.minX || b.maxY === b.minYdegenerate bounds guard
-
Whole numbers EQ-0155 · cadcraft/redline.js:46 · Read, left as it is
Checks the markup file is format version 1. Version numbers are whole numbers.
Before
o.v !== 1version number
-
Whole numbers EQ-0154 · cadcraft/process/safety/hazoptimer.js:57 · Read, left as it is
Checks the saved data is format version 1. Version numbers are whole numbers.
Before
s.v !== 1version number
-
Whole numbers EQ-0153 · cadcraft/process/live.js:37 · Read, left as it is
Checks the packet is format version 1. Version numbers are whole numbers.
Before
raw.v !== 1version number
-
Zero guard EQ-0152 · cadcraft/process/equip/pipestress.js:109 · Read, left as it is
Drops pipe load lines whose load is exactly zero (no contents or insulation). Only a true zero means no load.
Before
.filter((l) => l.w !== 0)empty load filter
-
Exact by construction EQ-0151 · cadcraft/process/env/molsketch.js:114 · Read, left as it is
Finds aromatic bonds by their fixed label 1.5, which is stored exactly.
Before
mol.bonds[e.k].order === 1.5bond-order code
-
Exact by construction EQ-0150 · cadcraft/process/env/molsketch.js:106 · Read, left as it is
Converts the aromatic bond label 1.5 into a single bond. It is a fixed label stored exactly.
Before
b.order === 1.5 ? 1 : b.orderbond-order code
-
Whole numbers EQ-0149 · cadcraft/process/env/molsketch.js:85 · Read, left as it is
Writes "H" rather than "H1" when there is exactly one hydrogen. Hydrogen counts are whole numbers.
Before
a.h === 1 ? 'H'hydrogen count
-
Whole numbers EQ-0148 · cadcraft/process/env/cheminfo.js:189 · Read, left as it is
Recognises an ether oxygen by having no hydrogens. Hydrogen counts are whole numbers.
Before
else if (a.h === 0 && nb[i].length === 2hydrogen count
-
Whole numbers EQ-0147 · cadcraft/process/env/cheminfo.js:188 · Read, left as it is
Recognises an alcohol oxygen by having exactly one hydrogen. Hydrogen counts are whole numbers.
Before
if (a.h === 1 && nb[i].length === 1hydrogen count
-
Whole numbers EQ-0146 · cadcraft/process/env/cheminfo.js:185 · Read, left as it is
Picks the group name from the number of hydrogens, which is a whole number.
Before
else if (inRing[i]) { if (a.h === 2)hydrogen count
-
Whole numbers EQ-0145 · cadcraft/process/env/cheminfo.js:184 · Read, left as it is
Picks the group name from the number of hydrogens, which is a whole number.
Before
dbl === 1 && a.h === 2) inc('=CH2')hydrogen count
-
Whole numbers EQ-0144 · cadcraft/process/env/cheminfo.js:182 · Read, left as it is
Picks the group name from the number of hydrogens, which is a whole number.
Before
inc(a.h === 1 ? 'ring =CH-'hydrogen count
-
Exact by construction EQ-0143 · cadcraft/process/env/cheminfo.js:179 · Read, left as it is
Counts bonds by their labels (2, 3, or 1.5 for aromatic). These are fixed labels, exactly stored.
Before
x.order === 2).length, trpbond-order codes
-
Exact by construction EQ-0142 · cadcraft/process/env/cheminfo.js:148 · Read, left as it is
Draws a double line for bonds labelled 2 or 1.5. These are fixed bond labels, exactly stored.
Before
b.order === 2 || b.order === 1.5bond-order codes
-
Exact by construction EQ-0141 · cadcraft/process/env/cheminfo.js:136 · Read, left as it is
Treats the code 1.5 (aromatic bond) as one bond in a valence sum. 1.5 is exact and is a fixed label.
Before
const o = b.order === 1.5 ? 11.5 exact; bond-order code
-
Exact by construction EQ-0140 · cadcraft/process/env/cheminfo.js:126 · Read, left as it is
Tests for the code 1.5 that means an aromatic bond. It is a fixed label that is stored exactly, not a measurement.
Before
b.order === 1.5 ? 41.5 exact in binary; bond-order code
-
Zero guard EQ-0139 · cadcraft/pointcloud.js:721 · Read, left as it is
Treats a scan point at exactly 0, 0, 0 as "no reading", as the scanner file does. Only an exact zero marks a missing point.
Before
px === 0 && py === 0 && pz === 0scanner sentinel for missing point
-
Fixed EQ-0138 · cadcraft/pdfmodel.js:136 · In the lab build
Decides whether a four-corner shape from a PDF is a straight-sided rectangle. Corner positions come out of page transformations, so tiny rounding differences could make a true rectangle look crooked; a very small allowance now accepts those.
Before
const isAxisRect = (c) => c.length === 4 && ((c[0].x === c[1].x && c[1].y === c[2].y && c[2].x === c[3].x && c[3].y === c[0].y) || (c[0].y === c[1].y && c[1].x === c[2].x && c[2].y === c[3].y && c[3].x === c[0].x));After
const isAxisRect = (c) => { const eq = (a, b) => Math.abs(a - b) <= 1e-9 * Math.max(1, Math.abs(a), Math.abs(b)); return c.length === 4 && ((eq(c[0].x, c[1].x) && eq(c[1].y, c[2].y) && eq(c[2].x, c[3].x) && eq(c[3].y, c[0].y)) || (eq(c[0].y, c[1].y) && eq(c[1].x, c[2].x) && eq(c[2].y, c[3].y) && eq(c[3].x, c[0].x))); };transformed coordinates; rect test on rounded values Tolerance: relative 1e-9. 1 identical copy changed together. To put it back:
node tools/accuracy-equality/fix.mjs revert EQ-0138. -
Copied value EQ-0137 · cadcraft/macro.js:46 · Read, left as it is
The macro equals test compares two typed numbers. It is left exact so typed text matches predictably; changing it would alter macro behaviour.
Before
Number(args[0]) === Number(args[1])compare of typed macro arguments; semantics of DIESEL "="
-
Copied value EQ-0136 · cadcraft/m3d/unit-table.js:126 · Read, left as it is
Returns the value unchanged when two units share the same stored conversion factor. The factors are fixed table entries, so an exact match is what is meant; a near miss just takes the normal route.
Before
a === b || a.factor === b.factortable constants
-
Exact by construction EQ-0135 · cadcraft/m3d/tools.js:1576 · Read, left as it is
Marks which grip directions are off-centre. The positions are the literal values 0, 0.5 and 1, which are exact.
Before
x !== 0.5 && live[a]values are literal 0/0.5/1
-
Exact by construction EQ-0134 · cadcraft/m3d/tools.js:1575 · Read, left as it is
Skips the centre of the grip grid. The grid positions are written as 0, 0.5 and 1, which are exact.
Before
f.every((x) => x === 0.5)values are literal 0/0.5/1
-
Zero guard EQ-0133 · cadcraft/m3d/tools.js:1147 · Read, left as it is
Guards against a zero-length direction by checking that the reciprocal is exactly zero. Only an exact zero is meant.
Before
1 / Math.max(len(this.T.localDir(this.n)), 1e-9) === 0division guard
-
Code, not a measurement EQ-0132 · cadcraft/m3d/tools.js:1060 · Read, left as it is
Compares the kind letter of two selected items. It is a code, not a number.
Before
x.t === s.t &&selection type code
-
Zero guard EQ-0131 · cadcraft/m3d/tools.js:727 · Read, left as it is
Rejects a typed angle of exactly zero because it would make nothing. Only a true zero is meant.
Before
!Number.isFinite(deg) || deg === 0typed value zero check
-
Whole numbers EQ-0130 · cadcraft/m3d/model.js:538 · Read, left as it is
Skips a zero-length edge when both ends are the same vertex number. Vertex numbers are whole numbers.
Before
stops[i].v === stops[i + 1].vvertex id
-
Whole numbers EQ-0129 · cadcraft/m3d/model.js:137 · Read, left as it is
Checks the cached shape was made from the same edit count. Edit counters are whole numbers.
Before
g.v === mesh.vversion counter
-
Zero guard EQ-0128 · cadcraft/m3d/lencalc.js:130 · Read, left as it is
Stops a length calculation from dividing by zero. Only a true zero must be refused, so it stays exact.
Before
o.t === '/' && b.v === 0division by zero guard
-
Zero guard EQ-0127 · cadcraft/m3d/earcut.js:247 · Read, left as it is
Skips exactly level edges so the next part does not divide by zero.
Before
) && p.next.y !== p.y && (px <division guard in earcut
-
Copied value EQ-0126 · cadcraft/m3d/earcut.js:217 · Read, left as it is
Tests whether two outline points are the very same stored point. They are copies, so exact is intended.
Before
p1.x === p2.x && p1.y === p2.yidentity of stored points
-
Copied value EQ-0125 · cadcraft/m3d/earcut.js:194 · Read, left as it is
Finds the left-most point, using the stored position to break ties. Exact comparison of stored coordinates is intended.
Before
p.x === leftmost.xtie-break on stored coordinates
-
Copied value EQ-0124 · cadcraft/m3d/earcut.js:179 · Read, left as it is
Breaks ties between candidate points that have the identical stored position. Points are copies of the same inputs, and the standard algorithm needs exact ties.
Before
p.x === m.x &&tie-break on identical stored coordinates
-
Zero guard EQ-0123 · cadcraft/m3d/earcut.js:161 · Read, left as it is
Skips edges that are exactly level so the next line does not divide by zero. Only a true zero must be skipped.
Before
p.next.y !== p.y) { const xdivision guard in earcut
-
Zero guard EQ-0122 · cadcraft/m3d/earcut.js:51 · Read, left as it is
Drops a corner point when three neighbouring points lie exactly on one line. This is the standard exact test of the well-known triangulation method, and loosening it could remove real corners.
Before
area(p.prev, p, p.next) === 0upstream earcut exact collinear test
-
Whole numbers EQ-0121 · cadcraft/live-crypto.js:329 · Read, left as it is
Checks the signed message is format version 1. Version numbers are whole numbers.
Before
claims.v !== 1version number
-
Whole numbers EQ-0120 · cadcraft/lisp/dxflist.js:152 · Read, left as it is
Tests whether a colour number is zero. Colour numbers are whole numbers, so exact is right.
Before
Math.abs(c) === 0ACI colour index integer
-
Whole numbers EQ-0119 · cadcraft/libpanel.js:196 · Read, left as it is
Chooses "item" or "items" in the result message from a whole-number count.
Before
r.total === 1 ? '' : 's'integer count
-
Copied value EQ-0118 · cadcraft/libitem.js:1855 · Read, left as it is
Decides whether the fourth corner of a 3D face differs from the third (a face with a repeated corner is a triangle). The corners are read straight from the file, not calculated, so exact matching is what is meant.
Before
c4.x !== c3.x || c4.y !== c3.y || (c4.z || 0) !== (c3.z || 0)DXF 3DFACE repeated corner is a literal copy
-
Code, not a measurement EQ-0117 · cadcraft/libitem.js:1605 · Read, left as it is
Reads the drawing header code that means metric (1) versus imperial. It is a coded setting, not a measurement.
Before
Number(db.header?.MEASUREMENT) === 1DXF MEASUREMENT code
-
Whole numbers EQ-0116 · cadcraft/libitem.js:362 · Read, left as it is
Picks the singular wording when the count is exactly one. Counts are whole numbers, so exact is right.
Before
Number(fills.n) === 1item count
-
Zero guard EQ-0115 · cadcraft/lencalc.js:130 · Read, left as it is
Stops a length calculation from dividing by zero. Only a true zero must be refused, so it stays exact.
Before
o.t === '/' && b.v === 0division by zero guard
-
Copied value EQ-0114 · cadcraft/gds.js:133 · Read, left as it is
Checks whether a shape outline ends on exactly the same point it started from, which is how the file marks a closed outline. Left as is because the end point is a copy of the start point.
Before
pts[0].x === pts[pts.length - 1].x && pts[0].y === pts[pts.length - 1].yclosing vertex is a repeated stored coordinate pair
-
Copied value EQ-0113 · cadcraft/gds.js:133 · Read, left as it is
Drops the last point of a chip outline when it repeats the first point exactly (a closed ring); the repeat is a copy of the same point.
Before
pts[0].x === pts[pts.length - 1].xclosing point is a copy of the first point
-
Still the default EQ-0112 · cadcraft/dxf.js:1507 · Read, left as it is
A size factor that is 1 unless the user changed it is checked against 1 to see whether it is still the untouched default.
Before
if ((e.sx ?? 1) !== 1) w(41compares a stored/typed factor with its default of exactly 1
-
Still the default EQ-0111 · cadcraft/dxf.js:659 · Read, left as it is
A size factor that is 1 unless the user changed it is checked against 1 to see whether it is still the untouched default.
Before
sz && sz !== 1compares a stored/typed factor with its default of exactly 1
-
Still the default EQ-0110 · cadcraft/dxf.js:177 · Read, left as it is
A size factor that is 1 unless the user changed it is checked against 1 to see whether it is still the untouched default.
Before
parseFloat(v) !== 1compares a stored/typed factor with its default of exactly 1
-
Still the default EQ-0109 · cadcraft/dwg/table-write.js:72 · Read, left as it is
Checks whether the x scale is still the untouched default of 1.
Before
else if (sx === 1) { w.BB(1)default encoding of 1
-
Copied value EQ-0108 · cadcraft/dwg/table-write.js:71 · Read, left as it is
Chooses a compact way to save an insert scale: all 1, all equal, or separate. The scales are typed or stored values, and saving as "all equal" must be exact so no precision is lost, so an exact test is right.
Before
sx === sy && sx === sz) { w.BB(2)equal scale values stored by the user; tolerance would write the wrong value for one axis
-
Still the default EQ-0107 · cadcraft/dwg/table-write.js:70 · Read, left as it is
Checks whether the block scale is still the untouched 1, 1, 1 default.
Before
sx === 1 && sy === 1 && sz === 1scale of exactly 1 is the default encoding
-
Still the default EQ-0106 · cadcraft/dwg/objects-write.js:818 · Read, left as it is
Checks whether any spline weight differs from the plain default of 1.
Before
const rational = ctl.some((p) => p.w !== undefined && p.w !== 1)weights default to exactly 1
-
Still the default EQ-0105 · cadcraft/dwg/objects-write.js:774 · Read, left as it is
Checks whether any spline weight differs from the plain default of 1.
Before
p.w !== undefined && p.w !== 1) || (r.weightsweights default to exactly 1
-
Still the default EQ-0104 · cadcraft/dwg/objects-write.js:660 · Read, left as it is
Checks whether the x scale is still the untouched default of 1.
Before
else if (sx === 1) { w.BB(1)default encoding of 1
-
Copied value EQ-0103 · cadcraft/dwg/objects-write.js:659 · Read, left as it is
Chooses a compact way to save an insert scale: all 1, all equal, or separate. The scales are typed or stored values, and saving as "all equal" must be exact so no precision is lost, so an exact test is right.
Before
sx === sy && sx === sz) { w.BB(2)equal scale values stored by the user; tolerance would write the wrong value for one axis
-
Still the default EQ-0102 · cadcraft/dwg/objects-write.js:658 · Read, left as it is
Checks whether the block scale is still the untouched 1, 1, 1 default.
Before
sx === 1 && sy === 1 && sz === 1scale of exactly 1 is the default encoding
-
Whole numbers EQ-0101 · cadcraft/dxf-model.js:58 · Read, left as it is
Picks singular or plural wording by checking whether the count is exactly one; counts are whole numbers.
Before
Number(fills.n) === 1plural selector on an integer count
-
Whole numbers EQ-0100 · cadcraft/dwg/messages.js:188 · Read, left as it is
Picks singular or plural wording by checking whether the count is exactly one; counts are whole numbers.
Before
Number(fills.n) === 1plural selector on an integer count
-
Still the default EQ-0099 · cadcraft/commands.js:3442 · Read, left as it is
Reports a scale only if inserting the file needs one other than 1; the scale is 1 exactly when both drawings use the same units.
Before
plan.scale !== 1 ? plan.scale : nullplan.scale is a/b, exactly 1 when units match (x/x = 1)
-
Still the default EQ-0098 · cadcraft/cmdline.js:47 · Read, left as it is
Checks whether the command line panel settings are still the untouched defaults, so nothing needs saving.
Before
s.w === d.wcompares a stored/typed factor with its default of exactly 1
-
Copied value EQ-0097 · cadcraft/cadcraft.js:1025 · Read, left as it is
Speaks the next-point announcement only when the point changed from the one announced before; the earlier point is a copy, so exact matching is right.
Before
was.x !== n.x || was.y !== n.yprevious ghost point is a copy of the earlier snap result
-
Copied value EQ-0096 · cadcraft/cadcraft.js:527 · Read, left as it is
Skips saving a view in history if it is the same as the last saved one; the saved view is a copy, so exact matching is right.
Before
top.cx === v.cx && top.cy === v.cycompares a snapshot with a stored copy of the same numbers
-
Code, not a measurement EQ-0095 · cadcraft/areaclip.js:75 · Read, left as it is
Checks the clipboard data is format version 1; a version number, not a measurement.
Before
d.v !== 1file format version code
-
Needs a second look EQ-0094 · cadcraft/addons/windows/lib/cutlist/cutlist.js:86 · Read, left as it is
Merges identical window parts into one cut-list row. The sizes may come from calculated frame dimensions, so a near-match could be missed, but that only gives an extra row; left for a person to decide.
Before
a.thickness === b.thickness && a.length === b.length && a.width === b.widthpart length/width may be derived from frame math; outcome is only an unmerged row, and group key thickness is string-exact anyway
-
Exact by construction EQ-0093 · cadcraft/addons/trusscraft/lib/design.js:130 · Read, left as it is
Looks for the truss corner joint that sits exactly at the start of the frame; the frame builder places it at literal zero, so exact is right.
Before
n.x === 0 && n.z === 0profile frame puts the first node at literal x=0, z=0
-
Still the default EQ-0092 · cadcraft/addons/objects.js:98 · Read, left as it is
A size factor that is 1 unless the user changed it is checked against 1 to see whether it is still the untouched default.
Before
(e.sx ?? 1) === 1 && (e.sy ?? 1) === 1compares a stored/typed factor with its default of exactly 1
-
Whole numbers EQ-0091 · cadcraft/addons/lighting/lib/reports.js:84 · Read, left as it is
Compares DMX universe numbers (whole numbers) to see whether two lights are on the same universe.
Before
spans[j].u === spans[i].uuniverse numbers are integers
-
Whole numbers EQ-0090 · cadcraft/addons/windows/lib/core.js:17 · Read, left as it is
Picks singular or plural wording by checking whether the count is exactly one; counts are whole numbers.
Before
Number(vars.n) === 1plural selector on an integer count
-
Whole numbers EQ-0089 · cadcraft/addons/trusscraft/lib/core.js:12 · Read, left as it is
Picks singular or plural wording by checking whether the count is exactly one; counts are whole numbers.
Before
Number(vars.n) === 1plural selector on an integer count
-
Whole numbers EQ-0088 · cadcraft/addons/piping/lib/mep-core.js:29 · Read, left as it is
Picks singular or plural wording by checking whether the count is exactly one; counts are whole numbers.
Before
Number(vars.n) === 1plural selector on an integer count
-
Whole numbers EQ-0087 · cadcraft/addons/pid/lib/core.js:23 · Read, left as it is
Picks singular or plural wording by checking whether the count is exactly one; counts are whole numbers.
Before
Number(vars.n) === 1plural selector on an integer count
-
Whole numbers EQ-0086 · cadcraft/addons/lighting/lib/core.js:17 · Read, left as it is
Picks singular or plural wording by checking whether the count is exactly one; counts are whole numbers.
Before
Number(vars.n) === 1plural selector on an integer count
-
Whole numbers EQ-0085 · cadcraft/addons/hvac/lib/mep-core.js:29 · Read, left as it is
Picks singular or plural wording by checking whether the count is exactly one; counts are whole numbers.
Before
Number(vars.n) === 1plural selector on an integer count
-
Whole numbers EQ-0084 · cadcraft/addons/harness/lib/core.js:17 · Read, left as it is
Picks singular or plural wording by checking whether the count is exactly one; counts are whole numbers.
Before
Number(vars.n) === 1plural selector on an integer count
-
Whole numbers EQ-0083 · cadcraft/addons/circuit/core/sheet.js:55 · Read, left as it is
Decides whether a wire between two pins is already straight; pins sit on a whole-number grid and turn only in quarter turns, so exact comparison is right.
Before
a.x === b.x || a.y === b.ypin positions are grid multiples (GRID=20) plus integer pin offsets rotated by quarter turns, no trig
-
Whole numbers EQ-0082 · cadcraft/addons/chip/lib/run/wave-view.js:70 · Read, left as it is
The width of a signal in bits is a whole number; the code checks whether it is a single wire.
Before
s.width === 1bit width is an integer
-
Whole numbers EQ-0081 · cadcraft/addons/chip/lib/run/vcd.js:100 · Read, left as it is
The width of a signal in bits is a whole number; the code checks whether it is a single wire.
Before
v === '' || width === 1bit width is an integer
-
Whole numbers EQ-0080 · cadcraft/addons/chip/lib/run/gls.js:69 · Read, left as it is
The width of a signal in bits is a whole number; the code checks whether it is a single wire.
Before
sig.width === 1bit width is an integer
-
Whole numbers EQ-0079 · cadcraft/addons/chip/lib/hdl/netlist.js:106 · Read, left as it is
The width of a signal in bits is a whole number; the code checks whether it is a single wire.
Before
width === 1 && (!rangebit width is an integer
-
Still the default EQ-0078 · cadcraft/addons/chip/lib/fmt/oasis.js:336 · Read, left as it is
A size factor that is 1 unless the user changed it is checked against 1 to see whether it is still the untouched default.
Before
((r.mag ?? 1) !== 1 ? 0x04 : 0)compares a stored/typed factor with its default of exactly 1
-
Still the default EQ-0077 · cadcraft/addons/chip/lib/fmt/oasis.js:334 · Read, left as it is
A size factor that is 1 unless the user changed it is checked against 1 to see whether it is still the untouched default.
Before
(r.mag ?? 1) === 1compares a stored/typed factor with its default of exactly 1
-
Whole numbers EQ-0076 · cadcraft/addons/chip/lib/fmt/oasis.js:260 · Read, left as it is
These are whole-number grid steps between points of a chip shape, so testing for exactly zero or exactly equal is right.
Before
const a = Math.max(Math.abs(dx), Math.abs(dy)), d = dy === 0point deltas are integer database units
-
Whole numbers EQ-0075 · cadcraft/addons/chip/lib/fmt/oasis.js:255 · Read, left as it is
These are whole-number grid steps between points of a chip shape, so testing for exactly zero or exactly equal is right.
Before
if (polygon && octa) { const dxpoint deltas are integer database units
-
Whole numbers EQ-0074 · cadcraft/addons/chip/lib/fmt/oasis.js:254 · Read, left as it is
These are whole-number grid steps between points of a chip shape, so testing for exactly zero or exactly equal is right.
Before
if (polygon && manh) { const dxpoint deltas are integer database units
-
Whole numbers EQ-0073 · cadcraft/addons/chip/lib/fmt/oasis.js:253 · Read, left as it is
These are whole-number grid steps between points of a chip shape, so testing for exactly zero or exactly equal is right.
Before
manh = false; if (dx !== 0 && dy !== 0 && Math.abs(dx)point deltas are integer database units
-
Whole numbers EQ-0072 · cadcraft/addons/chip/lib/fmt/oasis.js:248 · Read, left as it is
These are whole-number grid steps between points of a chip shape, so testing for exactly zero or exactly equal is right.
Before
dy === 0 || dx === 0 || a === bdx/dy are integer database-unit deltas
-
Still the default EQ-0071 · cadcraft/addons/chip/lib/fmt/gds.js:116 · Read, left as it is
A size factor that is 1 unless the user changed it is checked against 1 to see whether it is still the untouched default.
Before
s || (t.mag ?? 1) !== 1 || t.anglecompares a stored/typed factor with its default of exactly 1
-
Still the default EQ-0070 · cadcraft/addons/chip/lib/fmt/gds.js:80 · Read, left as it is
A size factor that is 1 unless the user changed it is checked against 1 to see whether it is still the untouched default.
Before
mag !== 1compares a stored/typed factor with its default of exactly 1
-
Copied value EQ-0069 · cadcraft/addons/cabinetcraft/lib/estimate.js:140 · Read, left as it is
Matches a sheet material by its thickness; both thicknesses are copied from the same parts list, not calculated, so an exact match is right.
Before
x.thickness === g.thicknessboth thicknesses are copied from the part data
-
Code, not a measurement EQ-0068 · cadcraft/addons/cabinet/main.js:419 · Read, left as it is
Counts the cabinets that use the same unit as the first one. The unit is a code, not a measurement.
Before
x.d.u === cabs[0].d.uUnit code compare.
-
Copied value EQ-0067 · cadcraft/addons/cabinetcraft/lib/draw.js:29 · Read, left as it is
Draws one front per position in the plan view, dropping repeats. Stacked drawers get their position from the same calculation so match exactly.
Before
h.x === g.xSame expression yields identical x.
-
Copied value EQ-0066 · cadcraft/addons/cabinetcraft/lib/cutlist/cutlist.js:86 · Read, left as it is
Groups cabinet parts that are the same size and material. Sizes are typed or copied from the same definition, so identical parts match exactly.
Before
a.thickness === b.thicknessParts from the same definition share sizes bit for bit.
-
Copied value EQ-0065 · cadcraft/addons/cabinet/lib/draw.js:29 · Read, left as it is
Draws one front per position in the plan view, dropping repeats. Stacked drawers get their position from the same calculation so match exactly.
Before
h.x === g.xSame expression yields identical x.
-
Copied value EQ-0064 · cadcraft/addons/cabinet/lib/cutlist/cutlist.js:86 · Read, left as it is
Groups cabinet parts that are the same size and material. Sizes are typed or copied from the same definition, so identical parts match exactly.
Before
a.thickness === b.thicknessParts from the same definition share sizes bit for bit.
-
Whole numbers EQ-0063 · bimcraft/xr/xr-core.js:179 · Read, left as it is
Ignores a peer message unless its version is exactly 1.
Before
x.v !== 1Version code.
-
Copied value EQ-0062 · bimcraft/wall-section-graphics.js:165 · Read, left as it is
Redraws the hatching only when the drawing scale differs from the one stored with the cut face.
Before
scale!==c.scaleDid-it-change check.
-
Copied value EQ-0061 · bimcraft/views-ui.js:775 · Read, left as it is
Looks up the label for the standard scale that matches the view. Values come from the same list.
Before
find((x) => x.ratio === v.ratio)?.labelMatching a stored value to a list entry.
-
Code, not a measurement EQ-0060 · bimcraft/views-ui.js:770 · Read, left as it is
Treats a scale of 0 as the automatic setting, and otherwise checks whether the view scale is one of the standard list entries.
Before
const std = v.ratio === 00 is the auto code; list match of stored value.
-
Copied value EQ-0059 · bimcraft/views-ui.js:454 · Read, left as it is
Selects the list entry that matches the saved plan scale. Both come from the same set of values.
Before
x.ratio === vals.scaleMatching a stored value to a list entry.
-
Copied value EQ-0058 · bimcraft/views-ui.js:269 · Read, left as it is
Selects the list entry that matches the callout scale. List entries and the stored scale come from the same set of values.
Before
x.ratio === c.scaleMatching a stored value to a list entry.
-
Whole numbers EQ-0057 · bimcraft/site-context.js:59 · Read, left as it is
Rejects saved site data unless its version number is exactly 1.
Before
o.v !== 1Version code.
-
Still the default EQ-0056 · bimcraft/res-ui.js:178 · Read, left as it is
Switches back to the normal default width only if the width is still the untouched spiral default.
Before
R.stair.width === SPIRAL_DEFAULTS.width) RIs the width still the default.
-
Still the default EQ-0055 · bimcraft/res-ui.js:177 · Read, left as it is
Switches a stair to the spiral default width only if the width is still the untouched default; a typed width is kept.
Before
e.target.value === 'spiral' && R.stair.width === STAIR_DEFAULTS.widthIs the width still the default.
-
Copied value EQ-0054 · bimcraft/res-elec.js:265 · Read, left as it is
Rewrites a device only if its height changed from the stored one. The new value is a copy of the old unless the user changed it.
Before
nx.height !== d.heightDid-it-change check.
-
Still the default EQ-0053 · bimcraft/render/pt-ggx.js:55 · Read, left as it is
Skips the material adjustment when the weight is the untouched default of exactly one.
Before
weight === 1Exact 1 shortcut for default weight.
-
Copied value EQ-0052 · bimcraft/render/anim.js:467 · Read, left as it is
Merges keyframes that land on the same time after a move. Times are already rounded to a fixed step, so they match exactly.
Before
last && last.t === k.tTimes rounded by r3 and deduped.
-
Copied value EQ-0051 · bimcraft/render/anim.js:129 · Read, left as it is
Keeps one keyframe when two sit at the same time, the later one winning. Times are values typed or stored, compared as is.
Before
out[out.length - 1].t === k.t) outDedupe of stored key times.
-
Copied value EQ-0050 · bimcraft/raster.js:171 · Read, left as it is
Treats a grid as having a single square cell size when the file states the same cell width and height. Both come straight from the file header.
Before
h.dx === h.dyValues read from file, not computed.
-
Zero guard EQ-0049 · bimcraft/raster.js:118 · Read, left as it is
Uses the file scale unless it is zero, in which case it uses 1. Only exact zero is a problem.
Before
meta.scale !== 0Zero scale guard.
-
Code, not a measurement EQ-0048 · bimcraft/live.js:88 · Read, left as it is
Skips a line that has not changed. Compares the line type name, which is text.
Before
was.t === now.tType string compare.
-
Copied value EQ-0047 · bimcraft/ifc/geo-tri.js:153 · Read, left as it is
Compares corner points of an outline that were copied from the same input list, so identical corners match exactly. A tolerance could merge points that are truly different.
Before
(a.x === b.x && a.y === b.y)Identity of input vertices.
-
Zero guard EQ-0046 · bimcraft/ifc/geo-tri.js:145 · Read, left as it is
When no ear is found, skips triangles that have exactly zero area. Exact zero is meant: only truly flat triangles are dropped.
Before
cross(e, p, p.next) !== 0Degenerate-triangle drop in fallback fan.
-
Zero guard EQ-0045 · bimcraft/ifc/geo-tri.js:133 · Read, left as it is
Removes a corner only when three points lie exactly on one line. Triangulation relies on a strict exact answer so shapes stay consistent with neighbouring faces.
Before
cross(a, e, c) === 0Exact collinearity in ear clipping (as in earcut).
-
Copied value EQ-0044 · bimcraft/ifc/geo-tri.js:118 · Read, left as it is
Compares corner points of an outline that were copied from the same input list, so identical corners match exactly. A tolerance could merge points that are truly different.
Before
(p.x !== a.x || p.y !== a.y)Identity of input vertices.
-
Copied value EQ-0043 · bimcraft/ifc/geo-tri.js:92 · Read, left as it is
Compares corner points of an outline that were copied from the same input list, so identical corners match exactly. A tolerance could merge points that are truly different.
Before
p.x === m.x && p.y === m.yIdentity of input vertex.
-
Zero guard EQ-0042 · bimcraft/ifc/geo-tri.js:77 · Read, left as it is
Skips edges that are perfectly level so the following division is never by zero.
Before
if (a.y !== b.y) {Guards division by (b.y - a.y).
-
Copied value EQ-0041 · bimcraft/ifc/geo-tri.js:62 · Read, left as it is
Picks the right-most corner of an outline, using a tie-break when two corners share the same x. Coordinates are input values, compared as is.
Before
p.x === r.xComparing input vertex coordinates.
-
Copied value EQ-0040 · bimcraft/ifc/geo-tri.js:55 · Read, left as it is
Compares corner points of an outline that were copied from the same input list, so identical corners match exactly. A tolerance could merge points that are truly different.
Before
last.x === first.xClosing vertex is a copy of the first.
-
Exact by construction EQ-0039 · bimcraft/framing.js:353 · Read, left as it is
Decides whether a rafter piece sits at the start of the panel. The start is set to exactly zero when laid out.
Before
const left = pc.x === 0; itemsPiece x is literal 0.
-
Exact by construction EQ-0038 · bimcraft/framing.js:324 · Read, left as it is
Decides whether a rafter piece sits at the start of the panel. The start is set to exactly zero when laid out.
Before
const left = pc.x === 0, n = cPiece x is literal 0.
-
Exact by construction EQ-0037 · bimcraft/framing.js:215 · Read, left as it is
Decides whether a rafter piece sits at the start of the panel. The start is set to exactly zero when the panel is laid out, so an exact test is right.
Before
left = p.x === 0;Piece x set literally to 0 for the left rafter.
-
Copied value EQ-0036 · bimcraft/flow/sim.js:52 · Read, left as it is
Orders simulation events by time and breaks ties by other fields. Using a tolerance here would make the ordering inconsistent, so exact ties are intended.
Before
x.t === y.tPriority queue comparator needs a strict weak ordering.
-
Whole numbers EQ-0035 · bimcraft/exr/exr.js:646 · Read, left as it is
Checks whether an image channel has the same pixel size as the picture. Pixel counts are whole numbers.
Before
c.width === widthPixel dimensions are integers.
-
Whole numbers EQ-0034 · bimcraft/coords-ui.js:141 · Read, left as it is
Moves the readout only if the new spot differs from the current one. Both offsets are rounded to whole pixels.
Before
best.dx !== dg.dxOffsets are Math.round results.
-
Whole numbers EQ-0033 · bimcraft/compute/parity.js:75 · Read, left as it is
Refuses to compare two pictures that are not the same pixel size. Pixel counts are whole numbers.
Before
ref.w !== test.wPixel dimensions are integers.
-
Whole numbers EQ-0032 · bimcraft/climate/pack.js:63 · Read, left as it is
Rejects a climate pack unless its format version is exactly 1. Versions are whole numbers.
Before
Number(j.version) !== 1Version code.
-
Copied value EQ-0031 · bimcraft/clashfix-bim.js:134 · Read, left as it is
Only records a new duct size when the proposed size differs from the size stored on the run. It compares against a stored copy, so exact is right.
Before
e1.section.w !== m.run.wDid-it-change check against stored value.
-
Whole numbers EQ-0030 · bimcraft/bimcraft.js:5092 · Read, left as it is
Finds placements that use the same library item version. Version numbers are whole numbers.
Before
Number(x.version) === Number(r.version)Version numbers are integers.
-
Zero guard EQ-0029 · bimcraft/wall-section-graphics.js:139 · Read, left as it is
Checks for a layer of exactly zero thickness (a thin membrane). Zero here is a typed or default value, not a measurement, so it stays exact.
Before
l.t===0Membrane layers are entered as exactly 0 thickness.
-
Zero guard EQ-0028 · bimcraft/wall-plan-graphics.js:111 · Read, left as it is
Checks for a layer of exactly zero thickness (a thin membrane). Zero here is a typed or default value, not a measurement, so it stays exact.
Before
if (layer.t === 0)Membrane layers are entered as exactly 0 thickness.
-
Zero guard EQ-0027 · bimcraft/wall-plan-graphics.js:106 · Read, left as it is
Checks for a layer of exactly zero thickness (a thin membrane). Zero here is a typed or default value, not a measurement, so it stays exact.
Before
layer.t === 0 ?Membrane layers are entered as exactly 0 thickness.
-
Zero guard EQ-0026 · bimcraft/wall-assemblies-ui.js:81 · Read, left as it is
Checks for a layer of exactly zero thickness (a thin membrane). Zero here is a typed or default value, not a measurement, so it stays exact.
Before
layer.t===0Membrane layers are entered as exactly 0 thickness.
-
Zero guard EQ-0025 · bimcraft/wall-assemblies-ui.js:54 · Read, left as it is
Checks for a layer of exactly zero thickness (a thin membrane). Zero here is a typed or default value, not a measurement, so it stays exact.
Before
some(l=>l.t===0)Membrane layers are entered as exactly 0 thickness.
-
Zero guard EQ-0024 · bimcraft/wall-assemblies-ui.js:51 · Read, left as it is
Checks for a layer of exactly zero thickness (a thin membrane). Zero here is a typed or default value, not a measurement, so it stays exact.
Before
${l.t===0?`borderMembrane layers are entered as exactly 0 thickness.
-
Zero guard EQ-0023 · bimcraft/assembly-schedule.js:51 · Read, left as it is
Checks for a layer of exactly zero thickness (a thin membrane). Zero here is a typed or default value, not a measurement, so it stays exact.
Before
l.t===0?trMembrane layers are entered as exactly 0 thickness.
-
Zero guard EQ-0022 · bimcraft/assembly-preview.js:11 · Read, left as it is
Checks for a layer of exactly zero thickness (a thin membrane). Zero here is a typed or default value, not a measurement, so it stays exact.
Before
l.t===0?Membrane layers are entered as exactly 0 thickness.
-
Copied value EQ-0021 · bimcraft/addons/pointcloud/ground-surface.js:69 · Read, left as it is
Checks whether an outline already ends on the point it started from, so it only adds a closing point when needed. Both ends are copies of the same typed point, so an exact match is what is meant.
Before
l.pts[0].x !== l.pts[l.pts.length - 1].xClosed-ring test on copied vertices.
-
Whole numbers EQ-0020 · cadcraft/addons/cabinetcraft/lib/core.js:17 · Read, left as it is
Picks the singular wording when the count is one. Counts are whole numbers, so it is left alone.
Before
Number(vars.n) === 1Plural count is a whole number.
-
Whole numbers EQ-0019 · cadcraft/addons/cabinet/lib/core.js:17 · Read, left as it is
Picks the singular wording when the count is one. Counts are whole numbers, so it is left alone.
Before
Number(vars.n) === 1Plural count is a whole number.
-
Whole numbers EQ-0018 · cadcraft/addons/apparel/lib/text.js:24 · Read, left as it is
Picks the singular wording when the count is one. Counts are whole numbers, so it is left alone.
Before
Number(vars.n) === 1Plural count is a whole number.
-
Whole numbers EQ-0017 · bimcraft/addons/sprinkler/lib/core.js:12 · Read, left as it is
Picks the singular wording when the count is one. Counts are whole numbers, so it is left alone.
Before
Number(vars.n) === 1Plural count is a whole number.
-
Whole numbers EQ-0016 · bimcraft/addons/plant/lib/core.js:12 · Read, left as it is
Picks the singular wording when the count is one. Counts are whole numbers, so it is left alone.
Before
Number(vars.n) === 1Plural count is a whole number.
-
Waiting for a release EQ-0015 · assets/js/engines/risk/weibull.js:55 · Read, left as it is
Needs a tolerance, but this file is part of the live site shared by every app, so it waits for your go to release.
Before
level === 0.95A decimal level; should compare within a tolerance, but this is a live shared-shell file under assets/js, so it waits for the owner's go for a release.
-
Exact by construction EQ-0014 · partcraft/cs-tensor.js:60 · Read, left as it is
Read and left as it is: an exponent of exactly 0.5 means square root. It is typed, never computed.
Before
y === 0.5Exponent 0.5 selects sqrt; 0.5 is exact and the exponent is typed, not computed.
-
Code, not a measurement EQ-0013 · detailcraft/rc/elements.js:401 · Read, left as it is
Read and left as it is: 0.5 is a typed code for which face of a layer is meant, not a measured value.
Before
ly.face === 0.5A typed layer-face code (0, 0.5, 1), exactly representable.
-
Exact by construction EQ-0012 · modelcraft/io/pbr.js:49 · Read, left as it is
Read and left as it is: 1.5 is the standard glass refractive index default and is exact in binary; it is compared with the same typed number from the file.
Before
m.ior !== 1.51.5 is the glTF default IOR and exactly representable; it is compared with the value read from the file, which is the same typed number.
-
Code, not a measurement EQ-0011 · cadcraft/process/env/cheminfo.js:77 · Read, left as it is
Read and left as it is: 1.5 is the code for an aromatic bond, a typed label and not a measured value.
Before
b.order === 1.51.5 is the code for an aromatic bond, a typed constant exactly representable in binary, never a computed result.
-
Exact by construction EQ-0010 · cadcraft/usd/util.js:60 · Read, left as it is
Read and left as it is: a tie test for rounding to a half float. 0.5 is exact in binary.
Before
rest === 0.5Half-float rounding tie test; the remainder is exact in binary, 0.5 is exact.
-
Exact by construction EQ-0009 · bimcraft/plc/std.js:78 · Read, left as it is
Read and left as it is: this is the round-half-to-even test. 0.5 and the remainder are exact in binary, and the test needs exact equality to find a true tie.
Before
Math.abs(x % 1) === 0.50.5 is a power of two, so it is held exactly, and x % 1 is exact in binary floating point. This is the round-half-to-even test and needs exact equality.
-
Whole numbers EQ-0008 · bimcraft/people-sim.js:144 · Read, left as it is
Read and left as it is: a whole-number grid step compared to 2 is exact.
Before
Math.abs(dj) === 2Whole grid step; exact.
-
Whole numbers EQ-0007 · bimcraft/people-sim.js:143 · Read, left as it is
Read and left as it is: a whole-number grid step compared to 2 is exact.
Before
Math.abs(di) === 2Whole grid step; exact.
-
Whole numbers EQ-0006 · bimcraft/people-sim.js:142 · Read, left as it is
Read and left as it is: a step count between grid cells is a whole number, so comparing it to 2 is exact.
Before
Math.abs(di) + Math.abs(dj) === 2di and dj are whole grid steps (-2..2), so the sum is an exact integer. The === 2 tangentsoft flagged compares integers, not decimals.
-
Fixed EQ-0005 · partcraft/field/lattice.js:23 · In the lab build
The lattice builder picks neighbouring cube faces by testing a computed squared distance against exactly 0.5. A computed distance can be off in the last digit and drop a neighbour. It now matches within a tiny tolerance.
Before
if (d2 === 0.5)After
if (Math.abs(d2 - 0.5) < 1e-12)d2 is a sum of squared differences (computed), so it is compared within a tolerance. Tolerance: 1e-12. 2 identical copies changed together. To put it back:
node tools/accuracy-equality/fix.mjs revert EQ-0005. -
Fixed EQ-0004 · cadcraft/process/equip/vessel.js:113 · In the lab build
The pressure-vessel calculation warns when the flat-plate factor C is the plain-plate value 0.33. A computed C could differ in the last digit and skip the warning. It now matches within a tiny tolerance.
Before
C === 0.33 ?After
Math.abs(C - 0.33) < 1e-12 ?C = 0.33 is a decimal; compare within a tolerance so a computed C still triggers the plain-plate note. Tolerance: 1e-12. 3 identical copies changed together. To put it back:
node tools/accuracy-equality/fix.mjs revert EQ-0004. -
Fixed EQ-0003 · cadcraft/process/env/dispersion.js:100 · In the lab build
The air-dispersion screening adds a note when the ambient temperature is the assumed 293.15 K. A temperature converted from 20 °C could differ in the last digit and miss the note. It now matches within a billionth of a kelvin.
Before
(Ta === 293.15 ?After
(Math.abs(Ta - 293.15) < 1e-9 ?293.15 K is a decimal; a temperature converted from 20 C can differ in the last bits and the 'assumed' note would be missed. Tolerance: 1e-9 K. 3 identical copies changed together. To put it back:
node tools/accuracy-equality/fix.mjs revert EQ-0003. -
Fixed EQ-0002 · cadcraft/addons/electrical/main.js:301 · In the lab build
Same units check as above, in the line that picks the scale. Kept in step so both lines agree on what counts as inches.
Before
per >= 10 && per !== 25.4 && per !== 304.8 ? per : 1After
per >= 10 && !(Math.abs(per - 25.4) < 1e-9) && !(Math.abs(per - 304.8) < 1e-9) ? per : 1Same unit-factor test as line 299, kept in step. Tolerance: 1e-9 mm. 1 identical copy changed together. To put it back:
node tools/accuracy-equality/fix.mjs revert EQ-0002. -
Fixed EQ-0001 · cadcraft/addons/electrical/main.js:299 · In the lab build
The electrical add-on guesses whether your drawing is in inches by checking if the units-per-inch number is exactly 25.4 or 304.8. A number that was worked out instead of typed can land a hair off, so the guess would wrongly say millimetres. It now accepts anything within a billionth.
Before
default: per === 25.4 || per === 304.8 ? 'I' : 'M'After
default: Math.abs(per - 25.4) < 1e-9 || Math.abs(per - 304.8) < 1e-9 ? 'I' : 'M'25.4 and 304.8 are decimals that binary cannot hold exactly; a unit factor that was computed (not typed) would miss the match. Tolerance: 1e-9 mm. 1 identical copy changed together. To put it back:
node tools/accuracy-equality/fix.mjs revert EQ-0001.