Add a command producing the dot product of two vectors in parameters

This commit is contained in:
Jeff Lance 2019-05-23 22:21:50 +02:00
parent a00478db06
commit 002062d79b

View File

@ -225,6 +225,20 @@
}
}
}
%% dot product
%%
\NewDocumentCommand \dotprod{ s g g } {
\IfBooleanTF {#1} {
\ensuremath{
\vec{#2} \cdot \vec{#3}
}
}{
\ensuremath{
\overrightarrow{#1\vphantom(} \cdot \overrightarrow{#2\vphantom(}
}
}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%