Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
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