Skip to content

Commit

Permalink
Fix for Xcode 7.2 and Swift 2.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
james committed Dec 17, 2015
1 parent bf1355c commit 31b1408
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Surge.playground/section-1.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ let sum = Surge.sum(n)

let a = [1.0, 3.0, 5.0, 7.0]
let b = [2.0, 4.0, 6.0, 8.0]
let product = Surge.mul(a, b)
let product = Surge.mul(a, y: b)

// MARK: - Matrix

Expand All @@ -25,16 +25,16 @@ let B = inv(A) * C

func plot<T>(values: [T], title: String) {
for value in values {
XCPCaptureValue(title, value)
XCPlaygroundPage.currentPage.captureValue(value, withIdentifier: title)
}
}

let count = 64
let frequency = 4.0
let amplitude = 3.0

let x = map(0..<count){ 2.0 * M_PI / Double(count) * Double($0) * frequency }
let x = (0..<count).map{ 2.0 * M_PI / Double(count) * Double($0) * frequency }

plot(sin(x), "Sine Wave")
plot(fft(sin(x)), "FFT")
plot(sin(x), title:"Sine Wave")
plot(fft(sin(x)), title:"FFT")

0 comments on commit 31b1408

Please sign in to comment.