Coveralls logob
Coveralls logo
  • Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

nicklockwood / Euclid / 84

21 Nov 2019 - 23:51 coverage: 60.066% (+0.7%) from 59.414%
84

Pull #10

travis-ci

9181eb84f9c35729a3bad740fb7f9d93?size=18&default=identiconweb-flow
Method for finding angle between a vector and a plane
Pull Request #10: Planes and angles

22 of 24 new or added lines in 3 files covered. (91.67%)

1265 of 2106 relevant lines covered (60.07%)

948.29 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/Sources/Line.swift
1
//
2
//  Line.swift
3
//  Euclid
4
//
5
//  Created by Nick Lockwood on 20/11/2019.
6
//  Copyright © 2018 Nick Lockwood. All rights reserved.
7
//
8
//  Distributed under the permissive MIT license
9
//  Get the latest version from here:
10
//
11
//  https://github.com/nicklockwood/Euclid
12
//
13
//  Permission is hereby granted, free of charge, to any person obtaining a copy
14
//  of this software and associated documentation files (the "Software"), to deal
15
//  in the Software without restriction, including without limitation the rights
16
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
//  copies of the Software, and to permit persons to whom the Software is
18
//  furnished to do so, subject to the following conditions:
19
//
20
//  The above copyright notice and this permission notice shall be included in all
21
//  copies or substantial portions of the Software.
22
//
23
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
//  SOFTWARE.
30
//
31

32
import Foundation
33

34
public struct Line : Hashable {
35
    public var point: Vector {
NEW
36
        didSet { point = point.quantized() }
!
37
    }
38

39
    public var direction: Vector {
NEW
40
        didSet { direction = direction.normalized() }
!
41
    }
42
}
Troubleshooting · Open an Issue · Sales · Support · ENTERPRISE · CAREERS · STATUS
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2023 Coveralls, Inc