aboutsummaryrefslogtreecommitdiff
path: root/doc/snippets/MatrixBase_hnormalized.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'doc/snippets/MatrixBase_hnormalized.cpp')
-rw-r--r--doc/snippets/MatrixBase_hnormalized.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/snippets/MatrixBase_hnormalized.cpp b/doc/snippets/MatrixBase_hnormalized.cpp
new file mode 100644
index 000000000..652cd77c0
--- /dev/null
+++ b/doc/snippets/MatrixBase_hnormalized.cpp
@@ -0,0 +1,6 @@
+Vector4d v = Vector4d::Random();
+Projective3d P(Matrix4d::Random());
+cout << "v = " << v.transpose() << "]^T" << endl;
+cout << "v.hnormalized() = " << v.hnormalized().transpose() << "]^T" << endl;
+cout << "P*v = " << (P*v).transpose() << "]^T" << endl;
+cout << "(P*v).hnormalized() = " << (P*v).hnormalized().transpose() << "]^T" << endl; \ No newline at end of file