Drake
double_overloads.h
Go to the documentation of this file.
1 
4 #pragma once
5 
6 namespace drake {
10 
17 inline double if_then_else(bool f_cond, double v_then, double v_else) {
18  return f_cond ? v_then : v_else;
19 }
20 
21 } // namespace drake
Definition: automotive_demo.cc:88
Eigen::AutoDiffScalar< typename Eigen::internal::remove_all< DerType1 >::type::PlainObject > if_then_else(bool f_cond, const Eigen::AutoDiffScalar< DerType1 > &x, const Eigen::AutoDiffScalar< DerType2 > &y)
Provides if-then-else expression for Eigen::AutoDiffScalar type.
Definition: autodiff_overloads.h:157