Skip to content

Commit b9e8b97

Browse files
committed
Fixup indentation.
1 parent d34f563 commit b9e8b97

File tree

2 files changed

+23
-23
lines changed

2 files changed

+23
-23
lines changed

Sources/ComplexModule/Complex+ElementaryFunctions.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -420,9 +420,9 @@ extension Complex: ElementaryFunctions {
420420

421421
@inlinable
422422
public static func pow(_ z: Complex, _ n: Int) -> Complex {
423-
if z.isZero {
424-
return n < 0 ? .infinity : n == 0 ? .one : .zero
425-
}
423+
if z.isZero {
424+
return n < 0 ? .infinity : n == 0 ? .one : .zero
425+
}
426426
// TODO: this implementation is not quite correct, because n may be
427427
// rounded in conversion to RealType. This only effects very extreme
428428
// cases, so we'll leave it alone for now.

Tests/ComplexTests/ElementaryFunctionTests.swift

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -399,18 +399,18 @@ final class ElementaryFunctionTests: XCTestCase {
399399
}
400400
}
401401
}
402-
403-
func testPowR<T: Real & FixedWidthFloatingPoint>(_ type: T.Type) {
404-
XCTAssertEqual(Complex<T>.pow(.zero, -.one), .infinity)
405-
XCTAssertEqual(Complex<T>.pow(.zero, .zero), .infinity)
406-
XCTAssertEqual(Complex<T>.pow(.zero, +.one), .infinity)
407-
}
408-
409-
func testPowN<T: Real & FixedWidthFloatingPoint>(_ type: T.Type) {
410-
XCTAssertEqual(Complex<T>.pow(.zero, -1), .infinity)
411-
XCTAssertEqual(Complex<T>.pow(.zero, 0), .one)
412-
XCTAssertEqual(Complex<T>.pow(.zero, +1), .zero)
413-
}
402+
403+
func testPowR<T: Real & FixedWidthFloatingPoint>(_ type: T.Type) {
404+
XCTAssertEqual(Complex<T>.pow(.zero, -.one), .infinity)
405+
XCTAssertEqual(Complex<T>.pow(.zero, .zero), .infinity)
406+
XCTAssertEqual(Complex<T>.pow(.zero, +.one), .infinity)
407+
}
408+
409+
func testPowN<T: Real & FixedWidthFloatingPoint>(_ type: T.Type) {
410+
XCTAssertEqual(Complex<T>.pow(.zero, -1), .infinity)
411+
XCTAssertEqual(Complex<T>.pow(.zero, 0), .one)
412+
XCTAssertEqual(Complex<T>.pow(.zero, +1), .zero)
413+
}
414414

415415
func testFloat() {
416416
testExp(Float.self)
@@ -423,8 +423,8 @@ final class ElementaryFunctionTests: XCTestCase {
423423
testAcosh(Float.self)
424424
testAsinh(Float.self)
425425
testAtanh(Float.self)
426-
testPowR(Float.self)
427-
testPowN(Float.self)
426+
testPowR(Float.self)
427+
testPowN(Float.self)
428428
}
429429

430430
func testDouble() {
@@ -438,11 +438,11 @@ final class ElementaryFunctionTests: XCTestCase {
438438
testAcosh(Double.self)
439439
testAsinh(Double.self)
440440
testAtanh(Double.self)
441-
testPowR(Double.self)
442-
testPowN(Double.self)
441+
testPowR(Double.self)
442+
testPowN(Double.self)
443443
}
444444

445-
#if (arch(i386) || arch(x86_64)) && !os(Windows) && !os(Android)
445+
#if (arch(i386) || arch(x86_64)) && !os(Windows) && !os(Android)
446446
func testFloat80() {
447447
testExp(Float80.self)
448448
testExpMinusOne(Float80.self)
@@ -454,8 +454,8 @@ final class ElementaryFunctionTests: XCTestCase {
454454
testAcosh(Float80.self)
455455
testAsinh(Float80.self)
456456
testAtanh(Float80.self)
457-
testPowR(Float80.self)
458-
testPowN(Float80.self)
457+
testPowR(Float80.self)
458+
testPowN(Float80.self)
459459
}
460-
#endif
460+
#endif
461461
}

0 commit comments

Comments
 (0)