MCPcopy Create free account
hub / github.com/SINGROUP/dscribe / cross

Function cross

dscribe/ext/geometry.cpp:21–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19using namespace std;
20
21inline vector<double> cross(const vector<double>& a, const vector<double>& b) {
22 return {a[1]*b[2]-a[2]*b[1], a[2]*b[0]-a[0]*b[2], a[0]*b[1]-a[1]*b[0]};
23}
24
25inline double dot(const vector<double>& a, const vector<double>& b) {
26 return a[0]*b[0] + a[1]*b[1] + a[2]*b[2];

Callers 1

extend_systemFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected