File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -309,6 +309,25 @@ namespace dynamicgraph {
309
309
REGISTER_UNARY_OP ( Inverser<MatrixHomogeneous>, Inverse_of_matrixHomo);
310
310
REGISTER_UNARY_OP ( Inverser<MatrixTwist>, Inverse_of_matrixtwist);
311
311
312
+
313
+
314
+ struct Normalize
315
+ : public UnaryOpHeader<dg::Vector,double >
316
+ {
317
+ void operator ()( const dg::Vector& m, double & res ) const
318
+ { res = m.norm (); }
319
+
320
+ virtual std::string getDocString () const
321
+ {
322
+ std::string docString
323
+ (" Computes the norm of a vector\n "
324
+ " - input vector\n " " - output double" );
325
+ return docString;
326
+ }
327
+ };
328
+ REGISTER_UNARY_OP ( Normalize, Norm_of_vector);
329
+
330
+
312
331
struct InverserRotation
313
332
: public UnaryOpHeader<MatrixRotation,MatrixRotation>
314
333
{
You can’t perform that action at this time.
0 commit comments