-
Notifications
You must be signed in to change notification settings - Fork 163
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
Fix point<T> divide and multiply to not to hardcode result as point<double> #157
Conversation
This PR is causing failures of the old friend
On AppVeyor, we are expecting some image checksum failures, eg. https://ci.appveyor.com/project/stefanseefeld/gil/builds/19660664, but these above are different. I'll have to investigate what's going on |
Interesting ! As far as I can see, the only semantic change of this PR changes the |
693bfe3
to
f9952e8
Compare
The problem was in the unexpected rounding or truncating towards zero like in here:
while the
what effectively means:
Originally I submitted this version of
I've just fixed it this way to preserve the expected behaviour:
I think, this experience helps to get closer to the question asked in #153 about why authors of the original I think uses like |
Now, I'll have to deal with the failure of Travis job |
f9952e8
to
8d453fc
Compare
AFAIU, the
There is no GIL location at the top of the trace. Eventually, I've prepared mwe and reported it here boostorg/function#29 |
8d453fc
to
dcc3d82
Compare
…ouble> The free variants of operator/ and operator* now yield new type of point<T> with T promoted to type common for both operands. Add missing member operator*=, for symmetry. Add template function iround(point<T>) as no-op sink for point specialisations for T of integer types. Add explicit casts of arithmetic intermediate results to avoid compilation warnings. Replace redundant point<T> construction in return statement with uniform initialization. Add static_assert validating range of axis_value integer template parameter. Update test/point/point.cpp with basic checks of all point<T> members. Fixes boostorg#153
dcc3d82
to
1534a4d
Compare
@stefanseefeld The CI-s are green now. Approve? |
The free variants of
operator/
andoperator*
now yield new type ofpoint<T>
withT
promoted to type common for both operands.Add missing member
operator*=
, for symmetry.Add template function
iround(point<T>)
as no-op sink forpoint
specialisations forT
of integer types.Add explicit casts of arithmetic intermediate results to avoid compilation warnings.
Replace redundant
point<T>
construction in return statement with uniform initialization.Add
static_assert
validating range ofaxis_value
integer template parameter.Update
test/point/point.cpp
with basic checks of allpoint<T>
members.References
Fixes #153
Tasklist