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 characters
import Browser.Dom | |
import Element exposing (Element) | |
import Element.Background as Background | |
import Element.Border as Border | |
import Element.Font as Font | |
import Element.Input as Input | |
import Html | |
import Html.Attributes | |
import Html.Events | |
import Json.Decode as Decode |
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 characters
class ViewControllerTest: XCTestCase { | |
var systemUnderTest: ViewController! | |
override func setUp() { | |
super.setUp() | |
//get the storyboard the ViewController under test is inside | |
let storyboard: UIStoryboard = UIStoryboard(name: "Main_iPhone", bundle: nil) |
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 characters
import UIKit | |
// Returns a list of points on the convex hull in counter-clockwise order. | |
// Note: the last point in the returned list is the same as the first one. | |
// | |
// https://en.wikibooks.org/wiki/Algorithm_Implementation/Geometry/Convex_hull/Monotone_chain | |
// | |
func closedConvexHull(points_ : [CGPoint]) -> [CGPoint] { | |
// 2D cross product of OA and OB vectors, i.e. z-component of their 3D cross product. |