Skip to content

Commit

Permalink
fix for issue #77 (#78)
Browse files Browse the repository at this point in the history
* fix for issue #77

* Revert "fix for issue #77"

This reverts commit 2ef78cd.

* fix for issue #77

* sorry, typo
  • Loading branch information
BrutusTT authored and dirk-thomas committed Apr 2, 2018
1 parent 51483bd commit d5d914c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rostime/include/ros/impl/duration.h
Expand Up @@ -56,7 +56,7 @@ namespace ros {
if (sec64 < INT_MIN || sec64 > INT_MAX)
throw std::runtime_error("Duration is out of dual 32-bit range");
sec = (int32_t)sec64;
nsec = (int32_t)((d - (double)sec)*1000000000);
nsec = (int32_t)(nearbyint((d - (double)sec)*1000000000));
return *static_cast<T*>(this);
}

Expand Down

0 comments on commit d5d914c

Please sign in to comment.