-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
various fixes for 0.6 #12
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
julia 0.4 | ||
Compat 0.7.15 | ||
julia 0.5 | ||
Compat 0.19.0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,9 @@ | ||
|
||
# Higher-order measures | ||
|
||
|
||
#typealias Point Tuple{Vararg{Measure}} | ||
#typealias Point2D Tuple{Measure, Measure} | ||
#typealias Point3D Tuple{Measure, Measure, Measure} | ||
|
||
typealias Vec{N} NTuple{N, Measure} | ||
typealias Vec2 Vec{2} | ||
typealias Vec3 Vec{3} | ||
const Vec{N} = NTuple{N, Measure} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i think an |
||
const Vec2 = Vec{2} | ||
const Vec3 = Vec{3} | ||
|
||
isabsolute(p::Vec) = false | ||
isabsolute{N}(p::NTuple{N, AbsoluteLength}) = true | ||
|
@@ -17,9 +12,9 @@ isabsolute{N}(p::NTuple{N, AbsoluteLength}) = true | |
#Vec(x::Measure, y::Measure) = Vec{2, Measure}((x, y)) | ||
#Vec() = Vec(0mm, 0mm) | ||
|
||
typealias AbsoluteVec{N} NTuple{N, Length{:mm, Float64}} | ||
typealias AbsoluteVec2 AbsoluteVec{2} | ||
typealias AbsoluteVec3 AbsoluteVec{3} | ||
const AbsoluteVec{N} = NTuple{N, Length{:mm, Float64}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And here |
||
const AbsoluteVec2 = AbsoluteVec{2} | ||
const AbsoluteVec3 = AbsoluteVec{3} | ||
|
||
#Base.zero(::Type{Vec}) = Vec() | ||
|
||
|
@@ -33,4 +28,3 @@ typealias AbsoluteVec3 AbsoluteVec{3} | |
@compat @generated function Base.:+{N}(a::Vec{N}, b::Vec{N}) | ||
Expr(:tuple, [:(a[$i] + b[$i]) for i=1:N]...) | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a
@compat
to work on 0.5 right?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, working on it rn