This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Example on how to cast matrices

Tags: None
(comma "," separated)
linello
Registered Member
Posts
56
Karma
0
OS

Example on how to cast matrices

Thu Aug 25, 2011 9:30 am
Hi,

I want to cast a Matrix<double,3,1> to a Matrix<int,3,1> for example, but the documentation of cast is not very clear...

Can someone help me?
linello
Registered Member
Posts
56
Karma
0
OS

Re: Example on how to cast matrices

Thu Aug 25, 2011 9:39 am
Ok, I found the solution...

Code: Select all
Matrix3d a= Matrix3d::Random();

a*=10;

Matrix3i b = a.cast<int>();


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]