STIR
6.4.0
STIR
src
include
stir
cross_product.h
Go to the documentation of this file.
1
#ifndef __stir_cross_product_H__
2
#define __stir_cross_product_H__
3
//
4
//
5
/*
6
Copyright (C) 2003- 2005, Hammersmith Imanet Ltd
7
This file is part of STIR.
8
9
SPDX-License-Identifier: Apache-2.0
10
11
See STIR/LICENSE.txt for details
12
*/
21
22
#include "
stir/CartesianCoordinate3D.h
"
23
24
START_NAMESPACE_STIR
25
36
37
template
<
class
coordT>
38
CartesianCoordinate3D<coordT>
39
cross_product
(
const
CartesianCoordinate3D<coordT>
& a,
const
CartesianCoordinate3D<coordT>
& b)
40
{
41
return
CartesianCoordinate3D<coordT>
(
42
a.y() * b.x() - a.x() * b.y(), -a.z() * b.x() + a.x() * b.z(), a.z() * b.y() - a.y() * b.z());
43
};
44
45
END_NAMESPACE_STIR
46
47
#endif
CartesianCoordinate3D.h
defines the stir::CartesianCoordinate3D<coordT> class
stir::CartesianCoordinate3D
a templated class for 3-dimensional coordinates.
Definition
CartesianCoordinate3D.h:53
stir::cross_product
CartesianCoordinate3D< coordT > cross_product(const CartesianCoordinate3D< coordT > &a, const CartesianCoordinate3D< coordT > &b)
the cross-product for 3-dimensional coordinates.
Definition
cross_product.h:39
Generated on Wed May 27 2026 17:04:05 for STIR by
1.13.2