Skip to content

Commit ce84f07

Browse files
authored
Correct typos (#31)
correct a whole slew of typos using typos-cli
1 parent 3256ab7 commit ce84f07

File tree

114 files changed

+604
-604
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+604
-604
lines changed

Package.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ let package = Package(
8686
.define("GATEENGINE_CLOSES_ALLWINDOWS_WITH_MAINWINDOW", .when(platforms: [.macOS, .windows, .linux])),
8787
/// Checks for reloadable resources and reloads them if they have changed
8888
.define("GATEENGINE_ENABLE_HOTRELOADING", .when(platforms: [.macOS, .windows, .linux], configuration: .debug)),
89-
/// The host platfrom requests the main window, so GateEngine won't create one until it's requested
89+
/// The host platform requests the main window, so GateEngine won't create one until it's requested
9090
.define("GATEENGINE_PLATFORM_CREATES_MAINWINDOW", .when(platforms: [.iOS, .tvOS])),
9191
/// The host platform can't be usaed to compile HTML5 products
9292
.define("GATEENGINE_WASI_UNSUPPORTED_HOST", .when(platforms: [.windows])),
@@ -99,7 +99,7 @@ let package = Package(
9999
#if false // Options for development of GateEngine. These should be commented out for tagged version releases.
100100
#warning("GateEngine development options are enabled. These can cause strange build errors on some platforms.")
101101

102-
// Options for developemnt of WASI platform
102+
// Options for developments of WASI platform
103103
#if false
104104
settings.append(contentsOf: [
105105
/// Allows HTML5 platform to be compiled from a compatible host, such as macOS. This allows the IDE to show compile errors without targeting WASI.
@@ -110,11 +110,11 @@ let package = Package(
110110
#endif
111111

112112
settings.append(contentsOf: [
113-
/// Printes the output of generated shaders
113+
/// Printers the output of generated shaders
114114
.define("GATEENGINE_LOG_SHADERS"),
115-
/// Enables varius additional checks and output for rendering
115+
/// Enables various additional checks and output for rendering
116116
.define("GATEENGINE_DEBUG_RENDERING"),
117-
/// Enables varius additional checks and output for input
117+
/// Enables various additional checks and output for input
118118
.define("GATEENGINE_DEBUG_HID"),
119119
/// Forces Apple platforms to use OpenGL for rendering
120120
.define("GATEENGINE_FORCE_OPNEGL_APPLE", .when(platforms: [.macOS, .iOS, .tvOS])),

Sources/GameMath/2D Types/2D Physics/2D Colliders/AxisAlignedBoundingBox2D.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public struct AxisAlignedBoundingBox2D: Collider2D {
1616
/// The updated radius of the collider
1717
/// Use the `update(transform:)` function to update this value.
1818
public private(set) var radius: Size2
19-
/// The updated offest of the collider
19+
/// The updated offset of the collider
2020
/// Use the `update(transform:)` function to update this value.
2121
public private(set) var offset: Position2
2222

@@ -185,7 +185,7 @@ public struct AxisAlignedBoundingBox2D: Collider2D {
185185
case let collider as AxisAlignedBoundingBox2D:
186186
return interpenetration(comparing: collider)
187187
default:
188-
// Other colliders forward their check to AABB. If we get here there is no implimentation.
188+
// Other colliders forward their check to AABB. If we get here there is no implementation.
189189
fatalError("Unhandled collider: \(type(of: collider))")
190190
}
191191
}
@@ -211,22 +211,22 @@ public struct AxisAlignedBoundingBox2D: Collider2D {
211211
let minPosition = rhs.center + rhs.offset - rhs.radius
212212
guard self.contains(minPosition, withThreshold: threshold) else {return false}
213213

214-
let maxPositon = minPosition + rhs.size
215-
guard self.contains(maxPositon, withThreshold: threshold) else {return false}
214+
let maxPosition = minPosition + rhs.size
215+
guard self.contains(maxPosition, withThreshold: threshold) else {return false}
216216

217217
return true
218218
}
219219

220220
/// `true` if `rhs` is inside `self`
221221
public func contains(_ rhs: Position2, withThreshold threshold: Float = 0) -> Bool {
222-
let positon = self.position - (self.radius + threshold)
222+
let position = self.position - (self.radius + threshold)
223223

224-
guard rhs.x >= positon.x else {return false}
225-
guard rhs.y >= positon.y else {return false}
224+
guard rhs.x >= position.x else {return false}
225+
guard rhs.y >= position.y else {return false}
226226

227227
let size = self.size + threshold
228-
guard rhs.x <= positon.x + size.x else {return false}
229-
guard rhs.y <= positon.y + size.y else {return false}
228+
guard rhs.x <= position.x + size.x else {return false}
229+
guard rhs.y <= position.y + size.y else {return false}
230230

231231
return true
232232
}

Sources/GameMath/2D Types/2D Physics/2D Colliders/BoundingCircle2D.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public extension BoundingCircle2D {
141141
@inlinable @inline(__always)
142142
func surfaceNormal(facing point: Position2) -> Direction2 {
143143
let position = self.position
144-
// If the points are the same there is no direction, return a defualt
144+
// If the points are the same there is no direction, return a default
145145
guard point != position else {return .up}
146146
return Direction2(from: self.position, to: point)
147147
}

Sources/GameMath/2D Types/2D Physics/2D Colliders/BoundingEllipsoid2D.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public extension BoundingEllipsoid2D {
110110

111111
func surfaceNormal(facing point: Position2) -> Direction2 {
112112
let position = self.position
113-
// If the points are the same there is no direction, return a defualt
113+
// If the points are the same there is no direction, return a default
114114
guard point != position else {return .up}
115115
return Direction2(from: position / radius, to: point / radius) * radius
116116
}

Sources/GameMath/2D Types/Transform2.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public struct Transform2 {
3636

3737
private var _needsUpdate: Bool = true
3838
private lazy var _matrix: Matrix4x4 = .identity
39-
private lazy var _roationMatrix: Matrix4x4 = .identity
39+
private lazy var _rotationMatrix: Matrix4x4 = .identity
4040
private lazy var _scaleMatrix: Matrix4x4 = .identity
4141
}
4242
#else
@@ -71,7 +71,7 @@ public struct Transform2 {
7171

7272
private var _needsUpdate: Bool = true
7373
private lazy var _matrix: Matrix4x4 = .identity
74-
private lazy var _roationMatrix: Matrix4x4 = .identity
74+
private lazy var _rotationMatrix: Matrix4x4 = .identity
7575
private lazy var _scaleMatrix: Matrix4x4 = .identity
7676
}
7777
#endif

Sources/GameMath/3D Types/3D Physics/3D Colliders/OrientedBoundingBox3D.swift

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ extension OrientedBoundingBox3D {
362362

363363
extension OrientedBoundingBox3D {
364364
@inline(__always)
365-
public var verticies: [Position3] {
365+
public var vertices: [Position3] {
366366
let x = self.radius.width
367367
let y = self.radius.height
368368
let z = self.radius.depth
@@ -379,12 +379,12 @@ extension OrientedBoundingBox3D {
379379
}
380380
@inline(__always)
381381
func vertexSpan(along axis: Direction3) -> ClosedRange<Float> {
382-
let verticies = self.verticies
382+
let vertices = self.vertices
383383

384-
var min = verticies[0].dot(axis)
384+
var min = vertices[0].dot(axis)
385385
var max = min
386386

387-
for vertex in verticies {
387+
for vertex in vertices {
388388
let d = vertex.dot(axis)
389389

390390
if d < min {
@@ -455,13 +455,13 @@ extension OrientedBoundingBox3D {
455455
}
456456

457457
@inline(__always)
458-
static func getNumHitPoints(_ box0: OrientedBoundingBox3D, _ hitNormal: Direction3, _ penetration: Float, _ vertIndexs: inout [Array<Position3>.Index]) -> [Position3] {
459-
let verticies = box0.verticies
458+
static func getNumHitPoints(_ box0: OrientedBoundingBox3D, _ hitNormal: Direction3, _ penetration: Float, _ vertIndexes: inout [Array<Position3>.Index]) -> [Position3] {
459+
let vertices = box0.vertices
460460

461-
var planePoint = verticies[0]
462-
var maxdist = verticies[0].dot(hitNormal)
461+
var planePoint = vertices[0]
462+
var maxdist = vertices[0].dot(hitNormal)
463463

464-
for vertex in verticies {
464+
for vertex in vertices {
465465
let d = vertex.dot(hitNormal)
466466
if d > maxdist {
467467
maxdist = d
@@ -475,21 +475,21 @@ extension OrientedBoundingBox3D {
475475
d -= penetration + 0.01
476476

477477
var collisionPoints: [Position3] = []
478-
for index in verticies.indices {
479-
let vertex = verticies[index]
478+
for index in vertices.indices {
479+
let vertex = vertices[index]
480480
let side = vertex.dot(hitNormal) - d
481481

482482
if side > 0 {
483483
collisionPoints.append(vertex)
484-
vertIndexs.append(index)
484+
vertIndexes.append(index)
485485
}
486486
}
487487

488488
return collisionPoints
489489
}
490490

491491
@inline(__always)
492-
static func sortVertices(_ verticies: inout [Position3], _ vertexIndicies: inout [Array<Position3>.Index]) {
492+
static func sortVertices(_ vertices: inout [Position3], _ vertexIndices: inout [Array<Position3>.Index]) {
493493
let faces = [[4,0,3,7],
494494
[1,5,6,2],
495495
[0,1,2,3],
@@ -498,27 +498,27 @@ extension OrientedBoundingBox3D {
498498
[6,7,3,2]]
499499

500500
var sortedVerts: [Position3] = [] // New correct clockwise order
501-
var sortedIndicies: [Array<Position3>.Index] = []
501+
var sortedIndices: [Array<Position3>.Index] = []
502502

503503
for face in faces where sortedVerts.count < 4 {
504504
var count = 0
505-
for vertexIndex in vertexIndicies where count < 4 {
505+
for vertexIndex in vertexIndices where count < 4 {
506506
if face.contains(vertexIndex) {
507507
count += 1
508508
}
509509
}
510510
if count == 4 {
511511
for index in face {
512-
sortedVerts.append(verticies[vertexIndicies.firstIndex(of: index)!])
513-
sortedIndicies.append(index)
512+
sortedVerts.append(vertices[vertexIndices.firstIndex(of: index)!])
513+
sortedIndices.append(index)
514514
}
515515
break
516516
}
517517
}
518518

519519
assert(sortedVerts.count == 4, "Must be 4 matching verts")
520-
verticies = sortedVerts
521-
vertexIndicies = sortedIndicies
520+
vertices = sortedVerts
521+
vertexIndices = sortedIndices
522522
}
523523

524524
@inline(__always)
@@ -552,12 +552,12 @@ extension OrientedBoundingBox3D {
552552

553553
@inline(__always)
554554
static func clipFaceFaceVerts(_ verts0: inout [Position3],
555-
_ vertIndexs0: inout [Array<Position3>.Index],
555+
_ vertIndexes0: inout [Array<Position3>.Index],
556556
_ verts1: inout [Position3],
557-
_ vertIndexs1: inout [Array<Position3>.Index]) -> [Position3] {
557+
_ vertIndexes1: inout [Array<Position3>.Index]) -> [Position3] {
558558

559-
sortVertices(&verts0, &vertIndexs0)
560-
sortVertices(&verts1, &vertIndexs1)
559+
sortVertices(&verts0, &vertIndexes0)
560+
sortVertices(&verts1, &vertIndexes1)
561561

562562
// Work out the normal for the face
563563
let v0 = verts0[1] - verts0[0]
@@ -657,8 +657,8 @@ extension OrientedBoundingBox3D {
657657
}
658658

659659
@inline(__always)
660-
static func clipLinePlane(_ verts0: [Position3], _ vertIndexs0: [Array<Position3>.Index], _ box0: OrientedBoundingBox3D,
661-
_ verts1: [Position3], _ vertIndexs1: [Array<Position3>.Index], _ box1: OrientedBoundingBox3D) -> [Position3] {
660+
static func clipLinePlane(_ verts0: [Position3], _ vertIndexes0: [Array<Position3>.Index], _ box0: OrientedBoundingBox3D,
661+
_ verts1: [Position3], _ vertIndexes1: [Array<Position3>.Index], _ box1: OrientedBoundingBox3D) -> [Position3] {
662662

663663
let p1 = closestPtPointOBB(verts0[0], box1)
664664
let p2 = closestPtPointOBB(verts0[1], box1)

Sources/GameMath/3D Types/Position3.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public extension Position3 {
8181

8282
public extension Position3 {
8383
/** The distance between `from` and `self`
84-
- parameter from: A value representing the source positon.
84+
- parameter from: A value representing the source position.
8585
*/
8686
@_transparent
8787
func distance(from: Self) -> Float {
@@ -90,8 +90,8 @@ public extension Position3 {
9090
return distance.squareRoot()
9191
}
9292

93-
/** Returns true when the distance from `self` and `rhs` is less then `threshhold`
94-
- parameter rhs: A value representing the destination positon.
93+
/** Returns true when the distance from `self` and `rhs` is less then `threshold`
94+
- parameter rhs: A value representing the destination position.
9595
- parameter threshold: The maximum distance that is considered "near".
9696
*/
9797
@_transparent

Sources/GameMath/3D Types/Quaternion.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,8 @@ extension Quaternion {
310310
/**
311311
Creates a quaternion a forward direction and optionally constrained to an Euler angle.
312312
- Parameter direction: The forward axis
313-
- Parameter up: The relative up vector, defualt is `Direction3.up`.
314-
- Parameter right: The relative right axis. Defualt value is `Direction3.right`.
313+
- Parameter up: The relative up vector, default is `Direction3.up`.
314+
- Parameter right: The relative right axis. Default value is `Direction3.right`.
315315
- Parameter constraint: Limits the rotation to an Euler angle. Use this to look in directions without a roll.
316316
*/
317317
@inlinable

Sources/GameMath/3D Types/Vector3.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public extension Vector3 {
116116
/**
117117
Returns a new instance with `x` incremented by `value`.
118118
- parameter value: The amount to add to `x`. To subtract use a negatie value.
119-
- returns: A new Self with `x` incrmented by `value`.
119+
- returns: A new Self with `x` incremented by `value`.
120120
*/
121121
@_transparent
122122
func addingToX(_ value: Float) -> Self {
@@ -125,7 +125,7 @@ public extension Vector3 {
125125
/**
126126
Returns a new instance with `y` incremented by `value`.
127127
- parameter value: The amount to add to `y`. To subtract use a negatie value.
128-
- returns: A new Self with `y` incrmented by `value`.
128+
- returns: A new Self with `y` incremented by `value`.
129129
*/
130130
@_transparent
131131
func addingToY(_ value: Float) -> Self {
@@ -134,7 +134,7 @@ public extension Vector3 {
134134
/**
135135
Returns a new instance with `z` incremented by `value`.
136136
- parameter value: The amount to add to `z`. To subtract use a negatie value.
137-
- returns: A new Self with `z` incrmented by `value`.
137+
- returns: A new Self with `z` incremented by `value`.
138138
*/
139139
@_transparent
140140
func addingToZ(_ value: Float) -> Self {

Sources/GameMath/BitStream.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public struct BitStream {
6161
}
6262

6363
/**
64-
Move the current read postion.
64+
Move the current read position.
6565
- parameter numBits: The number of bits to move the read position.
6666
*/
6767
@_transparent

0 commit comments

Comments
 (0)