Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

cross_product

Computes the cross product of two vectors.

Description

All vectors should have the same dimension, 3 or 2.

Synopsis

template<typename P>
P cross_product(P const & p1, P const & p2)

Parameters

Type

Concept

Name

Description

P const &

p1

first vector

P const &

p2

second vector

Returns

the cross product vector

Header

#include <boost/geometry/arithmetic/cross_product.hpp>


PrevUpHomeNext