Skip to content
edrumwri edited this page Oct 4, 2015 · 6 revisions

Ravelin can use exactly two floating-point data types: float and double. Each class/type in Ravelin ends with either a 'f' or a 'd' to indicate that the type uses float or double, respectively.

Matrix and vector support is not provided for integers, longs, etc. to keep the library simple. Additionally, there is no simple conversion between one floating-point type and another. For example, the following is not supported:

Origin3d x = Origin3f(1.0f, 2.0f, 3.0f);

Such needs can be realized through use of iterators, however, as the following shows:

Origin3d x;
Origin3f y(1.0f, 2.0f, 3.0f);  
std::copy(y.column_iterator_begin(), y.column_iterator_end(), x.column_iterator_begin());

Clone this wiki locally