| | | 1 | | //======================================================================= |
| | | 2 | | // FiniteSlabSectionFrame.cs |
| | | 3 | | //======================================================================= |
| | | 4 | | // MIT License, Copyright (c) 2024-present David Oravsky (mrdav30) |
| | | 5 | | // See LICENSE file in the project root for full license information. |
| | | 6 | | //======================================================================= |
| | | 7 | | |
| | | 8 | | using System; |
| | | 9 | | |
| | | 10 | | namespace FixedMathSharp.Geometry; |
| | | 11 | | |
| | | 12 | | /// <summary>Exact closed admission for a flat-capped circle or Z-axis stadium extrusion.</summary> |
| | | 13 | | /// <content>Owns finite point, segment, and triangle section admission in one exact rigid frame.</content> |
| | | 14 | | internal readonly partial struct FiniteSlabSectionFrame |
| | | 15 | | { |
| | | 16 | | // The planar capsule is the Y-core capsule kernel evaluated at (X,Z,0). |
| | | 17 | | // Full endpoint disks and the central rectangle have exactly the stadium |
| | | 18 | | // union; extra hemisphere clipping would only add redundant constraints. |
| | | 19 | | private readonly CapsuleFiniteSectionFrame _radial; |
| | | 20 | | private readonly Signed320 _cap; |
| | 1017 | 21 | | private ScaledRigidFrame3d SourceFrame => _radial.ShapeFrame.SourceFrame; |
| | 45155 | 22 | | internal CapsuleFiniteSectionFrame RadialFrame => _radial; |
| | 2343 | 23 | | internal Signed320 Cap => _cap; |
| | 6702 | 24 | | internal WideAxis3 Transform(Vector3d point) => _radial.Transform(point); |
| | 8713 | 25 | | internal int PointWords => _radial.ShapeFrame.HasExactScale ? FiniteSectionPoint.AffineWords : FiniteSectionPoint.Wo |
| | 536 | 26 | | internal int RootWords => _radial.ShapeFrame.HasExactScale ? FiniteSectionPoint.AffineRootWords : FiniteSectionPoint |
| | | 27 | | |
| | | 28 | | /// <summary>Prepares an exact primitive-local circle extrusion for pretransformed source coordinates.</summary> |
| | | 29 | | internal FiniteSlabSectionFrame(Fixed64 height, Fixed64 radius, Signed320 coordinateDenominator) |
| | | 30 | | { |
| | 37 | 31 | | _radial = new CapsuleFiniteSectionFrame(Fixed64.Zero, radius, coordinateDenominator); |
| | 37 | 32 | | _cap = Signed320.NarrowValue(WideArithmetic.MultiplySigned320(coordinateDenominator, |
| | 37 | 33 | | Signed320.ExtendValue(Signed192.Raw(height)))); |
| | 37 | 34 | | } |
| | | 35 | | |
| | | 36 | | internal FiniteSlabSectionFrame(Vector3d origin, FixedQuaternion rotation, |
| | | 37 | | Vector3d center, FixedQuaternion slabRotation, Fixed64 length, Fixed64 radius, Fixed64 halfThickness, bool fullH |
| | | 38 | | { |
| | 527 | 39 | | if (halfThickness <= Fixed64.Zero) throw new ArgumentOutOfRangeException(nameof(halfThickness)); |
| | 523 | 40 | | _radial = new CapsuleFiniteSectionFrame(origin, rotation, center, slabRotation, length, radius); |
| | | 41 | | // Transformed coordinates carry 2D, so an authored full height |
| | | 42 | | // supplies the exact cap directly, including an odd raw half-height. |
| | 523 | 43 | | Signed192 height = fullHeight ? Signed192.Raw(halfThickness) |
| | 523 | 44 | | : WideArithmetic.AddSigned192(Signed192.Raw(halfThickness), Signed192.Raw(halfThickness)); |
| | 523 | 45 | | _cap = WideArithmetic.MultiplySigned192(height, _radial.ShapeFrame.Denominator); |
| | 523 | 46 | | } |
| | | 47 | | |
| | | 48 | | internal FiniteSlabSectionFrame(in ScaledRigidFrame3d sourceFrame, |
| | | 49 | | Vector3d center, FixedQuaternion slabRotation, Fixed64 length, Fixed64 radius, Fixed64 halfThickness, bool fullH |
| | | 50 | | { |
| | 183 | 51 | | if (sourceFrame.IsRigid) |
| | | 52 | | { |
| | 16 | 53 | | this = new FiniteSlabSectionFrame(sourceFrame.RigidOrigin, sourceFrame.Rotation, |
| | 16 | 54 | | center, slabRotation, length, radius, halfThickness, fullHeight); |
| | 16 | 55 | | return; |
| | | 56 | | } |
| | 167 | 57 | | if (halfThickness <= Fixed64.Zero || halfThickness > (Fixed64)(fullHeight ? 8192 : 4096)) |
| | 4 | 58 | | throw new ArgumentOutOfRangeException(nameof(halfThickness)); |
| | 163 | 59 | | _radial = new CapsuleFiniteSectionFrame(sourceFrame, center, slabRotation, length, radius); |
| | 163 | 60 | | Signed192 height = fullHeight ? Signed192.Raw(halfThickness) |
| | 163 | 61 | | : WideArithmetic.AddSigned192(Signed192.Raw(halfThickness), Signed192.Raw(halfThickness)); |
| | 163 | 62 | | _cap = Signed320.NarrowValue(WideArithmetic.MultiplySigned320(_radial.ShapeFrame.CoordinateDenominator, height)) |
| | 163 | 63 | | } |
| | | 64 | | |
| | | 65 | | internal bool ContainsPoint(Vector3d point) |
| | | 66 | | { |
| | 28 | 67 | | WideAxis3 p = _radial.Transform(point); |
| | 28 | 68 | | return WideArithmetic.AddSigned320(p.Y, _cap).Sign >= 0 |
| | 28 | 69 | | && WideArithmetic.SubtractSigned320(p.Y, _cap).Sign <= 0 |
| | 28 | 70 | | && _radial.ContainsTransformedPoint(Radial(p)); |
| | | 71 | | } |
| | | 72 | | |
| | | 73 | | internal bool ContainsPoint(Vector3d point, ReadOnlySpan<Vector2d> prismOffsets) |
| | | 74 | | { |
| | 33 | 75 | | if (prismOffsets.IsEmpty) return ContainsPoint(point); |
| | 29 | 76 | | WideAxis3 p = Transform(point); |
| | 29 | 77 | | if (WideArithmetic.AddSigned320(p.Y, _cap).Sign < 0 |
| | 34 | 78 | | || WideArithmetic.SubtractSigned320(p.Y, _cap).Sign > 0) return false; |
| | 24 | 79 | | int winding = GetPrismWinding(prismOffsets); |
| | 202 | 80 | | for (int edge = 0; edge < prismOffsets.Length; edge++) |
| | 85 | 81 | | if (PrismWall(p, prismOffsets[edge], prismOffsets[(edge + 1) % prismOffsets.Length]).Sign * winding < 0) |
| | 8 | 82 | | return false; |
| | 16 | 83 | | return true; |
| | | 84 | | } |
| | | 85 | | |
| | | 86 | | internal bool IntersectsSegment(FixedSegment segment, ReadOnlySpan<Vector2d> prismOffsets) |
| | | 87 | | { |
| | 7417 | 88 | | if (prismOffsets.IsEmpty) return IntersectsSegment(segment); |
| | 202 | 89 | | Span<ulong> values = stackalloc ulong[4 * PointWords]; Span<int> signs = stackalloc int[4]; |
| | 202 | 90 | | Span<ulong> root = stackalloc ulong[RootWords]; root.Clear(); |
| | 101 | 91 | | return TryGetPrismSegmentParameter(segment, prismOffsets, |
| | 101 | 92 | | ContactQuadratic.At(values, signs, 0, PointWords), |
| | 101 | 93 | | ContactQuadratic.At(values, signs, 1, PointWords), root); |
| | | 94 | | } |
| | | 95 | | |
| | | 96 | | /// <summary>Tests an exact pretransformed subsegment in the existing radial and height intervals.</summary> |
| | | 97 | | internal bool IntersectsTransformedSegment(WideAxis3 start, WideAxis3 end, in RationalSegmentInterval clip) |
| | | 98 | | { |
| | 87 | 99 | | WideAxis3 delta = Difference(end, start); |
| | 312 | 100 | | for (int primitive = 0; primitive < (_radial.Length == Fixed64.Zero ? 1 : 3); primitive++) |
| | 117 | 101 | | if (TryGetPrimitive(start, delta, primitive, out Signed832 a, out Signed832 b, out Signed832 c, |
| | 117 | 102 | | out var ln, out var ld, out var un, out var ud) |
| | 165 | 103 | | && CapsuleFiniteSectionFrame.IntersectsQuadratic(a, b, c, ln, ld, un, ud, clip)) return true; |
| | 39 | 104 | | return false; |
| | | 105 | | } |
| | | 106 | | |
| | | 107 | | /// <summary>Tests a retained exact subsegment without rounding either cut endpoint.</summary> |
| | | 108 | | internal bool IntersectsSegment(FixedSegment segment, in RationalSegmentInterval clip) => |
| | 48 | 109 | | IntersectsTransformedSegment(Transform(segment.Start), Transform(segment.End), clip); |
| | | 110 | | |
| | | 111 | | internal bool TryGetFirstSegmentParameter(FixedSegment segment, ReadOnlySpan<Vector2d> prismOffsets, |
| | 1289 | 112 | | ContactQuadratic numerator, ContactQuadratic denominator, Span<ulong> root) => prismOffsets.IsEmpty |
| | 1289 | 113 | | ? TryGetFirstSegmentParameter(segment, numerator, denominator, root) |
| | 1289 | 114 | | : TryGetPrismSegmentParameter(segment, prismOffsets, numerator, denominator, root); |
| | | 115 | | |
| | | 116 | | /// <summary>Retains the first finite parameter admitted by the slab's projected footprint, without height clipping. |
| | | 117 | | internal bool TryGetFirstProjectedSegmentParameter(FixedSegment segment, ReadOnlySpan<Vector2d> prismOffsets, |
| | 197 | 118 | | ContactQuadratic numerator, ContactQuadratic denominator, Span<ulong> root) => prismOffsets.IsEmpty |
| | 197 | 119 | | ? TryGetFirstSegmentParameter(segment, numerator, denominator, root, includeHeight: false) |
| | 197 | 120 | | : TryGetPrismSegmentParameter(segment, prismOffsets, numerator, denominator, root, includeHeight: false); |
| | | 121 | | |
| | | 122 | | private bool TryGetPrismSegmentParameter(FixedSegment segment, ReadOnlySpan<Vector2d> offsets, |
| | | 123 | | ContactQuadratic numerator, ContactQuadratic denominator, Span<ulong> root, bool includeHeight = true) |
| | | 124 | | { |
| | 3480 | 125 | | numerator.Clear(); denominator.Set(Signed576.ExtendValue(Signed320.ExtendValue(Signed192.Signed(1)))); root.Clea |
| | 2320 | 126 | | Span<ulong> values = stackalloc ulong[8 * PointWords]; Span<int> signs = stackalloc int[8]; |
| | 1160 | 127 | | ContactQuadratic upperN = ContactQuadratic.At(values, signs, 0, PointWords), |
| | 1160 | 128 | | upperD = ContactQuadratic.At(values, signs, 1, PointWords), |
| | 1160 | 129 | | n = ContactQuadratic.At(values, signs, 2, PointWords), |
| | 1160 | 130 | | d = ContactQuadratic.At(values, signs, 3, PointWords); |
| | 2320 | 131 | | upperN.Set(Signed576.ExtendValue(Signed320.ExtendValue(Signed192.Signed(1)))); upperN.CopyTo(upperD); |
| | 2320 | 132 | | WideAxis3 first = Transform(segment.Start), last = Transform(segment.End); |
| | 1160 | 133 | | int winding = GetPrismWinding(offsets); |
| | 14432 | 134 | | for (int wall = includeHeight ? -2 : 0; wall < offsets.Length; wall++) |
| | | 135 | | { |
| | | 136 | | Signed576 a, b; |
| | 6231 | 137 | | if (wall == -2) |
| | | 138 | | { |
| | 972 | 139 | | a = Signed576.ExtendValue(WideArithmetic.AddSigned320(first.Y, _cap)); |
| | 972 | 140 | | b = Signed576.ExtendValue(WideArithmetic.AddSigned320(last.Y, _cap)); |
| | | 141 | | } |
| | 5259 | 142 | | else if (wall == -1) |
| | | 143 | | { |
| | 972 | 144 | | a = Signed576.ExtendValue(WideArithmetic.SubtractSigned320(_cap, first.Y)); |
| | 972 | 145 | | b = Signed576.ExtendValue(WideArithmetic.SubtractSigned320(_cap, last.Y)); |
| | | 146 | | } |
| | | 147 | | else |
| | | 148 | | { |
| | 8574 | 149 | | Vector2d start = offsets[wall], end = offsets[(wall + 1) % offsets.Length]; |
| | 8574 | 150 | | a = PrismWall(first, start, end); b = PrismWall(last, start, end); |
| | 4423 | 151 | | if (winding < 0) { a = WideArithmetic.SubtractSigned576(default, a); b = WideArithmetic.SubtractSigned57 |
| | | 152 | | } |
| | 6231 | 153 | | Signed576 velocity = WideArithmetic.SubtractSigned576(b, a); |
| | 9976 | 154 | | if (velocity.IsZero) { if (a.Sign < 0) return false; continue; } |
| | 2516 | 155 | | if (velocity.Sign > 0) |
| | | 156 | | { |
| | 2524 | 157 | | n.Set(WideArithmetic.SubtractSigned576(default, a)); d.Set(velocity); |
| | 1262 | 158 | | if (ContactQuadratic.CompareRatios(n, d, root, numerator, denominator, root) > 0) |
| | 786 | 159 | | { n.CopyTo(numerator); d.CopyTo(denominator); } |
| | | 160 | | } |
| | | 161 | | else |
| | | 162 | | { |
| | 2508 | 163 | | n.Set(a); d.Set(WideArithmetic.SubtractSigned576(default, velocity)); |
| | 1254 | 164 | | if (ContactQuadratic.CompareRatios(n, d, root, upperN, upperD, root) < 0) |
| | 782 | 165 | | { n.CopyTo(upperN); d.CopyTo(upperD); } |
| | | 166 | | } |
| | 2661 | 167 | | if (ContactQuadratic.CompareRatios(numerator, denominator, root, upperN, upperD, root) > 0) return false; |
| | | 168 | | } |
| | 985 | 169 | | return true; |
| | | 170 | | } |
| | | 171 | | |
| | | 172 | | private Signed576 PrismWall(WideAxis3 point, Vector2d start, Vector2d end) |
| | | 173 | | { |
| | 8659 | 174 | | Signed320 scale = WideArithmetic.AddSigned320(_radial.ShapeFrame.CoordinateDenominator, _radial.ShapeFrame.Coord |
| | 8659 | 175 | | Signed320 x = WideArithmetic.SubtractSigned320(point.X, Signed320.NarrowValue(WideArithmetic.MultiplySigned320(s |
| | 8659 | 176 | | Signed320 z = WideArithmetic.SubtractSigned320(point.Z, Signed320.NarrowValue(WideArithmetic.MultiplySigned320(s |
| | 8659 | 177 | | Signed320 ex = Signed320.ExtendValue(WideArithmetic.SubtractSigned192(Signed192.Raw(end.X), Signed192.Raw(start. |
| | 8659 | 178 | | Signed320 ez = Signed320.ExtendValue(WideArithmetic.SubtractSigned192(Signed192.Raw(end.Y), Signed192.Raw(start. |
| | 8659 | 179 | | return WideArithmetic.SubtractSigned576(WideArithmetic.MultiplySigned320(ex, z), WideArithmetic.MultiplySigned32 |
| | | 180 | | } |
| | | 181 | | |
| | | 182 | | internal static int GetPrismWinding(ReadOnlySpan<Vector2d> offsets) |
| | | 183 | | { |
| | 5604 | 184 | | if (offsets.Length < 3) throw new ArgumentException("A convex prism requires at least three offsets.", nameof(of |
| | 5598 | 185 | | Vector2d a = offsets[0]; |
| | 11852 | 186 | | for (int index = 1; index + 1 < offsets.Length; index++) |
| | | 187 | | { |
| | 5923 | 188 | | Signed192 x = WideArithmetic.SubtractSigned192(Signed192.Raw(offsets[index].X), Signed192.Raw(a.X)); |
| | 5923 | 189 | | Signed192 z = WideArithmetic.SubtractSigned192(Signed192.Raw(offsets[index].Y), Signed192.Raw(a.Y)); |
| | 5923 | 190 | | Signed192 y = WideArithmetic.SubtractSigned192(Signed192.Raw(offsets[index + 1].X), Signed192.Raw(a.X)); |
| | 5923 | 191 | | Signed192 w = WideArithmetic.SubtractSigned192(Signed192.Raw(offsets[index + 1].Y), Signed192.Raw(a.Y)); |
| | 5923 | 192 | | int sign = WideArithmetic.SubtractSigned320(WideArithmetic.MultiplySigned192(x, w), WideArithmetic.MultiplyS |
| | 11518 | 193 | | if (sign != 0) return sign; |
| | | 194 | | } |
| | 3 | 195 | | throw new ArgumentException("The convex prism offsets must span an area.", nameof(offsets)); |
| | | 196 | | } |
| | | 197 | | |
| | | 198 | | internal bool IntersectsSegment(FixedSegment segment) |
| | | 199 | | { |
| | 7344 | 200 | | WideAxis3 start = _radial.Transform(segment.Start), delta = Difference(_radial.Transform(segment.End), start); |
| | 27406 | 201 | | for (int primitive = 0; primitive < (_radial.Length == Fixed64.Zero ? 1 : 3); primitive++) |
| | 10345 | 202 | | if (TryGetPrimitive(start, delta, primitive, out Signed832 a, out Signed832 b, out Signed832 c, |
| | 10345 | 203 | | out Signed320 ln, out Signed320 ld, out Signed320 un, out Signed320 ud) |
| | 10659 | 204 | | && CapsuleFiniteSectionFrame.IntersectsQuadratic(a, b, c, ln, ld, un, ud)) return true; |
| | 3358 | 205 | | return false; |
| | | 206 | | } |
| | | 207 | | |
| | | 208 | | internal bool TryGetFirstSegmentParameter(FixedSegment segment, |
| | | 209 | | ContactQuadratic numerator, ContactQuadratic denominator, Span<ulong> root) |
| | 426 | 210 | | => TryGetFirstSegmentParameter(segment, numerator, denominator, root, includeHeight: true); |
| | | 211 | | |
| | | 212 | | private bool TryGetFirstSegmentParameter(FixedSegment segment, |
| | | 213 | | ContactQuadratic numerator, ContactQuadratic denominator, Span<ulong> root, bool includeHeight) |
| | | 214 | | { |
| | 1305 | 215 | | numerator.Clear(); denominator.Clear(); root.Clear(); |
| | 870 | 216 | | WideAxis3 start = _radial.Transform(segment.Start), delta = Difference(_radial.Transform(segment.End), start); |
| | 870 | 217 | | Span<ulong> values = stackalloc ulong[10 * PointWords]; Span<int> signs = stackalloc int[10]; |
| | 435 | 218 | | Span<ulong> candidateRoot = stackalloc ulong[RootWords]; |
| | 435 | 219 | | ContactQuadratic qa = ContactQuadratic.At(values, signs, 0, PointWords), |
| | 435 | 220 | | qb = ContactQuadratic.At(values, signs, 1, PointWords), |
| | 435 | 221 | | qc = ContactQuadratic.At(values, signs, 2, PointWords), |
| | 435 | 222 | | n = ContactQuadratic.At(values, signs, 3, PointWords), |
| | 435 | 223 | | d = ContactQuadratic.At(values, signs, 4, PointWords); |
| | 435 | 224 | | bool found = false; |
| | 3268 | 225 | | for (int primitive = 0; primitive < (_radial.Length == Fixed64.Zero ? 1 : 3); primitive++) |
| | | 226 | | { |
| | 1199 | 227 | | if (!TryGetPrimitive(start, delta, primitive, out Signed832 a, out Signed832 b, out Signed832 c, |
| | 1199 | 228 | | out Signed320 ln, out Signed320 ld, out Signed320 un, out Signed320 ud, includeHeight) |
| | 1199 | 229 | | || !CapsuleFiniteSectionFrame.IntersectsQuadratic(a, b, c, ln, ld, un, ud)) continue; |
| | 1806 | 230 | | n.Clear(); d.Clear(); candidateRoot.Clear(); |
| | 602 | 231 | | SetFirstQuadraticParameter(a, b, c, ln, ld, qa, qb, qc, n, d, candidateRoot); |
| | 602 | 232 | | if (!found || ContactQuadratic.CompareRatios(n, d, candidateRoot, numerator, denominator, root) < 0) |
| | | 233 | | { |
| | 1712 | 234 | | n.CopyTo(numerator); d.CopyTo(denominator); candidateRoot.CopyTo(root); found = true; |
| | | 235 | | } |
| | | 236 | | } |
| | 435 | 237 | | return found; |
| | | 238 | | } |
| | | 239 | | |
| | | 240 | | private bool TryGetPrimitive(WideAxis3 start, WideAxis3 delta, int primitive, |
| | | 241 | | out Signed832 a, out Signed832 b, out Signed832 c, |
| | | 242 | | out Signed320 ln, out Signed320 ld, out Signed320 un, out Signed320 ud, bool includeHeight = true) |
| | | 243 | | { |
| | 11661 | 244 | | if (!_radial.TryGetPrimitiveWide(Radial(start), Radial(delta), primitive, out a, out b, out c, |
| | 12998 | 245 | | out ln, out ld, out un, out ud)) return false; |
| | 10333 | 246 | | if (!includeHeight) return true; |
| | 41260 | 247 | | Signed320 rn = ln, rd = ld, sn = un, sd = ud; |
| | 10315 | 248 | | if (!CapsuleFiniteSectionFrame.TryGetCenteredAxisInterval(start.Y, delta.Y, _cap, out ln, out ld, out un, out ud |
| | 6266 | 249 | | return false; |
| | | 250 | | // Doubled normalized-frame coordinates and differences are <198 bits. |
| | | 251 | | // Interval cross products fit 398 bits; radial coefficients <400, |
| | | 252 | | // discriminants <801. Flat clipping adds no polynomial factors, so |
| | | 253 | | // the existing ten-limb point and seventeen-limb root banks suffice. |
| | 4647 | 254 | | if (Compare(rn, rd, ln, ld) > 0) { ln = rn; ld = rd; } |
| | 4661 | 255 | | if (Compare(sn, sd, un, ud) < 0) { un = sn; ud = sd; } |
| | 4049 | 256 | | return Compare(ln, ld, un, ud) <= 0; |
| | | 257 | | } |
| | | 258 | | |
| | | 259 | | private static int Compare(Signed320 n, Signed320 d, Signed320 otherN, Signed320 otherD) => |
| | 12147 | 260 | | WideArithmetic.SubtractSigned832(WideArithmetic.MultiplySigned576ToSigned832(Signed576.ExtendValue(n), otherD), |
| | | 261 | | |
| | | 262 | | private static void SetFirstQuadraticParameter(Signed832 a, Signed832 b, Signed832 c, |
| | | 263 | | Signed320 lowerN, Signed320 lowerD, ContactQuadratic qa, ContactQuadratic qb, ContactQuadratic qc, |
| | | 264 | | ContactQuadratic numerator, ContactQuadratic denominator, Span<ulong> root) |
| | | 265 | | { |
| | 602 | 266 | | if (WideFiniteConeIntersection.GetPolynomialSignAtRationalParameter(a, b, c, lowerN, lowerD) <= 0) |
| | | 267 | | { |
| | 972 | 268 | | numerator.Set(Signed576.ExtendValue(lowerN)); denominator.Set(Signed576.ExtendValue(lowerD)); |
| | 486 | 269 | | return; |
| | | 270 | | } |
| | 348 | 271 | | qa.Set(a); qb.Set(b); qc.Set(c); |
| | 116 | 272 | | bool retained = ContactQuadratic.TryGetParameter(qa, qb, qc, -1, root, numerator, denominator); |
| | 125 | 273 | | if (!retained) retained = ContactQuadratic.TryGetParameter(qa, qb, qc, 1, root, numerator, denominator); |
| | | 274 | | System.Diagnostics.Debug.Assert(retained); |
| | 116 | 275 | | } |
| | | 276 | | |
| | 23342 | 277 | | private static WideAxis3 Radial(WideAxis3 point) => new(point.X, point.Z, default); |
| | 4194 | 278 | | private static WideAxis3 Difference(WideAxis3 end, WideAxis3 start) => new( |
| | 4194 | 279 | | WideArithmetic.SubtractSigned320(end.X, start.X), WideArithmetic.SubtractSigned320(end.Y, start.Y), |
| | 4194 | 280 | | WideArithmetic.SubtractSigned320(end.Z, start.Z)); |
| | | 281 | | } |