We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9ff339 commit dd03d5cCopy full SHA for dd03d5c
src/matrix/operator.cpp
@@ -309,6 +309,25 @@ namespace dynamicgraph {
309
REGISTER_UNARY_OP( Inverser<MatrixHomogeneous>, Inverse_of_matrixHomo);
310
REGISTER_UNARY_OP( Inverser<MatrixTwist>, Inverse_of_matrixtwist);
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
331
struct InverserRotation
332
: public UnaryOpHeader<MatrixRotation,MatrixRotation>
333
{
0 commit comments