diff options
author | Gael Guennebaud <g.gael@free.fr> | 2008-11-20 10:47:12 +0000 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2008-11-20 10:47:12 +0000 |
commit | cc6121b98d16d567580743ac54d4809124b2b29c (patch) | |
tree | 54003a4a4ab3938cc7b0df4099359564006858ba /doc/QuickStartGuide.dox | |
parent | a3b89e0ee68b6fb6a13180f5282add8d6f83f3af (diff) |
tutorial: add the cast function
Diffstat (limited to 'doc/QuickStartGuide.dox')
-rw-r--r-- | doc/QuickStartGuide.dox | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/QuickStartGuide.dox b/doc/QuickStartGuide.dox index c48e153cf..25bbf4632 100644 --- a/doc/QuickStartGuide.dox +++ b/doc/QuickStartGuide.dox @@ -188,6 +188,15 @@ v = 6 6 6 </td></tr></table> +\subsection TutorialCasting Casting + +In Eigen, any matrices of same size and same scalar type are all naturally compatible. The scalar type can be explicitely casted to another one using the template cast() function: +\code +Matrix3d md(1,2,3); +Matrix3f mf = md.cast<float>(); +\endcode +Note that casting to the same scalar type in an expression is free. + \subsection TutorialMap Map Any memory buffer can be mapped as an Eigen expression: |