Last active
January 25, 2022 06:40
-
-
Save GUIEEN/0693b6009e79c882e55c5b15fc13cbeb to your computer and use it in GitHub Desktop.
Revisions
-
GUIEEN revised this gist
Jan 25, 2022 . 1 changed file with 18 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ public func quadrantOf(x: Int, y: Int) -> String { var quadrant = "" switch (x, y) { case (1..., 1...): quadrant = "1" case (..<0, 1...): quadrant = "2" case (..<0, ..<0): quadrant = "3" case (1..., ..<0): quadrant = "4" default: quadrant = "boundary" } return quadrant } -
GUIEEN revised this gist
Jan 24, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import Foundation let formatter = DateFormatter() formatter.dateFormat = "yyyy-MM-dd HH:mm:ss.SSS " func log_with_time(_ items: Any...) { print(formatter.string(from: Date()), terminator: "") for idx in items.indices { print(items[idx], terminator: idx == items.count-1 ? "\n" : " ") -
GUIEEN revised this gist
Jan 24, 2022 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,9 @@ import Foundation let formatter = DateFormatter() formatter.dateFormat = "yyyy-MM-dd HH:mm:ss.SSS " func printLog(_ items: Any...) { print(formatter.string(from: Date()), terminator: "") for idx in items.indices { print(items[idx], terminator: idx == items.count-1 ? "\n" : " ") } } -
GUIEEN created this gist
Jan 24, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ import Foundation let formatter = DateFormatter() formatter.dateFormat = "yyyy-MM-dd HH:mm:ss.SSS " func log_with_time(_ log: Any...) { print(formatter.string(from: Date()), terminator: "") print(log) }