forked from RobotLocomotion/drake
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Users will expect it to be comparable in performance to the ternary conditional operator, so we should do it that way.
- Loading branch information
1 parent
96a6e87
commit 664e849
Showing
2 changed files
with
6 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,4 @@ | ||
#include "drake/common/double_overloads.h" | ||
|
||
namespace drake { | ||
double if_then_else(const bool f_cond, const double v_then, | ||
const double v_else) { | ||
return f_cond ? v_then : v_else; | ||
} | ||
} // namespace drake | ||
// For now, this is an empty .cc file that only serves to confirm that | ||
// double_overloads.h is a stand-alone header. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters