dot_product.cpp
来自「basic mathematic classes used for math p」· C++ 代码 · 共 19 行
CPP
19 行
#include "mathclass.h"
m_real operator%( position const& a, vector const& b )
{
return ( a.p[0]*b.p[0] + a.p[1]*b.p[1] + a.p[2]*b.p[2] );
}
m_real operator%( vector const& b, position const& a )
{
return ( a.p[0]*b.p[0] + a.p[1]*b.p[1] + a.p[2]*b.p[2] );
}
m_real operator%( vector const& a, vector const& b )
{
return ( a.p[0]*b.p[0] + a.p[1]*b.p[1] + a.p[2]*b.p[2] );
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?