Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Example/Tests/HSRangeTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class HSRangeTests: XCTestCase {
let range = HSRange(low: low, high: high)

XCTAssert(range.low == low, "range.low must be \(low) [found \(String(describing: range.low)).]")

XCTAssert(range.high == high, "range.high must be \(high) [found \(String(describing: range.high)).]")
}

Expand Down
2 changes: 1 addition & 1 deletion HSRange/Classes/HSRange.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public extension HSRange {
//middle value of the range
//e.g. Range(-100,100), this will return 0
var mid: Double {
return (self.low + self.high)/2.0
return (self.low + self.high)/4.0
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this is divided by 4.0?

}

//this returns the value inside of range
Expand Down