File tree Expand file tree Collapse file tree 3 files changed +22
-0
lines changed
Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,11 @@ public struct Line2D: Sendable {
1616}
1717
1818public extension Line2D {
19+ @inlinable
20+ var direction : Direction2 {
21+ return Direction2 ( from: p1, to: p2)
22+ }
23+
1924 func pointNear( _ p: Position2 ) -> Position2 {
2025 let ab = p2 - p1
2126 let ap = p - p1
Original file line number Diff line number Diff line change @@ -18,6 +18,11 @@ public struct Line3D: Sendable {
1818}
1919
2020public extension Line3D {
21+ @inlinable
22+ var direction : Direction3 {
23+ return Direction3 ( from: p1, to: p2)
24+ }
25+
2126 @inlinable
2227 func pointNear( _ p: Position3 ) -> Position3 {
2328 let ab = p2 - p1
Original file line number Diff line number Diff line change @@ -94,6 +94,18 @@ public extension Size3 {
9494 self . y = newValue. y
9595 }
9696 }
97+
98+
99+ @inlinable
100+ var xz : Size2 {
101+ get {
102+ return Size2 ( x, z)
103+ }
104+ set {
105+ self . x = newValue. x
106+ self . z = newValue. y
107+ }
108+ }
97109}
98110
99111public extension Size3 {
You can’t perform that action at this time.
0 commit comments