summaryrefslogtreecommitdiff
path: root/public/vendor/codemirror/mode/swift/index.html
diff options
context:
space:
mode:
authorWu Cheng-Han2016-01-17 14:28:04 -0600
committerWu Cheng-Han2016-01-17 14:28:04 -0600
commiteaa8ccaccb1091820d0a8d1223996a6dd057347d (patch)
tree6b4aaa3b3d1a2fed68147510142663222533775a /public/vendor/codemirror/mode/swift/index.html
parentce65e58096d57ace02723d11a125673f9d48c293 (diff)
Upgrade CodeMirror to 5.10.1 and now support fullscreen, jump-to-line in editor
Diffstat (limited to 'public/vendor/codemirror/mode/swift/index.html')
-rw-r--r--[-rwxr-xr-x]public/vendor/codemirror/mode/swift/index.html20
1 files changed, 10 insertions, 10 deletions
diff --git a/public/vendor/codemirror/mode/swift/index.html b/public/vendor/codemirror/mode/swift/index.html
index 2649dc37..109f3fdb 100755..100644
--- a/public/vendor/codemirror/mode/swift/index.html
+++ b/public/vendor/codemirror/mode/swift/index.html
@@ -35,11 +35,11 @@
// Created by Main Account on 12/18/14.
// Copyright (c) 2014 Razeware LLC. All rights reserved.
//
-
+
import Foundation
-
+
class TipCalculatorModel {
-
+
var total: Double
var taxPct: Double
var subtotal: Double {
@@ -47,30 +47,30 @@ class TipCalculatorModel {
return total / (taxPct + 1)
}
}
-
+
init(total: Double, taxPct: Double) {
self.total = total
self.taxPct = taxPct
}
-
+
func calcTipWithTipPct(tipPct: Double) -> Double {
return subtotal * tipPct
}
-
+
func returnPossibleTips() -> [Int: Double] {
-
+
let possibleTipsInferred = [0.15, 0.18, 0.20]
let possibleTipsExplicit:[Double] = [0.15, 0.18, 0.20]
-
+
var retval = [Int: Double]()
for possibleTip in possibleTipsInferred {
let intPct = Int(possibleTip*100)
retval[intPct] = calcTipWithTipPct(possibleTip)
}
return retval
-
+
}
-
+
}
</textarea></form>