Drake
extract_double.h File Reference
#include <stdexcept>
#include "drake/common/nice_type_name.h"
#include "drake/common/number_traits.h"
Include dependency graph for extract_double.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 drake
 

Functions

template<typename T >
double ExtractDoubleOrThrow (const T &scalar)
 Converts a ScalarType value to a double, failing at runtime (not compile time) if the type cannot be converted to a double. More...
 
double ExtractDoubleOrThrow (double scalar)
 Returns scalar as a double. Never throws. More...