OSDN Git Service

式の単純化
authormasakih <masakih@users.sourceforge.jp>
Fri, 21 Jul 2017 14:34:33 +0000 (23:34 +0900)
committermasakih <masakih@users.sourceforge.jp>
Fri, 21 Jul 2017 14:34:33 +0000 (23:34 +0900)
KCD/SakutekiCalculator.swift

index 8b3634f..2963284 100644 (file)
@@ -55,7 +55,7 @@ class Formula33: SakutekiCalculator {
         
         let saku1 = ships
             .map(normalSakuteki)
-            .map { sqrt($0) }
+            .map(sqrt)
             .reduce(0, +)
         
         let saku2 = ships