mirror of https://github.com/CGAL/cgal
148 lines
3.2 KiB
C++
148 lines
3.2 KiB
C++
// ============================================================================
|
|
//
|
|
// Copyright (c) 1998 The CGAL Consortium
|
|
//
|
|
// This software and related documentation is part of an INTERNAL release
|
|
// of the Computational Geometry Algorithms Library (CGAL). It is not
|
|
// intended for general use.
|
|
//
|
|
// ----------------------------------------------------------------------------
|
|
//
|
|
// release : $CGAL_Revision: $
|
|
// release_date : $CGAL_Date: $
|
|
//
|
|
// file : include/CGAL/wmult.h
|
|
// source : sqdistance_2.fw
|
|
// author(s) : Geert-Jan Giezeman
|
|
//
|
|
// coordinator : Saarbruecken
|
|
//
|
|
// ============================================================================
|
|
|
|
|
|
#ifndef CGAL_WMULT_H
|
|
#define CGAL_WMULT_H
|
|
|
|
CGAL_BEGIN_NAMESPACE
|
|
|
|
|
|
#if defined CGAL_HOMOGENEOUS_H
|
|
template <class RT>
|
|
inline RT wmult(Homogeneous<RT>*, const RT &a, const RT & w)
|
|
{
|
|
return a*w;
|
|
}
|
|
|
|
template <class RT>
|
|
inline RT wmult(Homogeneous<RT>*,
|
|
const RT &a, const RT & w1, const RT & w2)
|
|
{
|
|
return a*w1*w2;
|
|
}
|
|
|
|
template <class RT>
|
|
inline RT wmult(Homogeneous<RT>*, const RT &a,
|
|
const RT & w1, const RT & w2, const RT & w3)
|
|
{
|
|
return a*w1*w2*w3;
|
|
}
|
|
|
|
template <class RT>
|
|
inline RT wmult(Homogeneous<RT>*, const RT &a,
|
|
const RT & w1, const RT & w2, const RT & w3, const RT & w4)
|
|
{
|
|
return a*w1*w2*w3*w4;
|
|
}
|
|
#endif // CGAL_HOMOGENEOUS_H
|
|
|
|
#if defined CGAL_SIMPLE_HOMOGENEOUS_H
|
|
template <class RT>
|
|
inline RT wmult(Simple_homogeneous<RT>*, const RT &a, const RT & w)
|
|
{
|
|
return a*w;
|
|
}
|
|
|
|
template <class RT>
|
|
inline RT wmult(Simple_homogeneous<RT>*,
|
|
const RT &a, const RT & w1, const RT & w2)
|
|
{
|
|
return a*w1*w2;
|
|
}
|
|
|
|
template <class RT>
|
|
inline RT wmult(Simple_homogeneous<RT>*, const RT &a,
|
|
const RT & w1, const RT & w2, const RT & w3)
|
|
{
|
|
return a*w1*w2*w3;
|
|
}
|
|
|
|
template <class RT>
|
|
inline RT wmult(Simple_homogeneous<RT>*, const RT &a,
|
|
const RT & w1, const RT & w2, const RT & w3, const RT & w4)
|
|
{
|
|
return a*w1*w2*w3*w4;
|
|
}
|
|
#endif // CGAL_SIMPLE_HOMOGENEOUS_H
|
|
|
|
#if defined CGAL_CARTESIAN_H
|
|
template <class RT>
|
|
inline RT wmult(Cartesian<RT> *, const RT &a, const RT & )
|
|
{
|
|
return a;
|
|
}
|
|
|
|
template <class RT>
|
|
inline RT wmult(Cartesian<RT> *,
|
|
const RT &a, const RT & , const RT & )
|
|
{
|
|
return a;
|
|
}
|
|
|
|
template <class RT>
|
|
inline RT wmult(Cartesian<RT> *, const RT &a,
|
|
const RT & , const RT & , const RT & )
|
|
{
|
|
return a;
|
|
}
|
|
|
|
template <class RT>
|
|
inline RT wmult(Cartesian<RT> *, const RT &a,
|
|
const RT & , const RT & , const RT & , const RT & )
|
|
{
|
|
return a;
|
|
}
|
|
#endif // CGAL_CARTESIAN_H
|
|
|
|
#if defined CGAL_SIMPLE_CARTESIAN_H
|
|
template <class RT>
|
|
inline RT wmult(Simple_cartesian<RT> *, const RT &a, const RT & )
|
|
{
|
|
return a;
|
|
}
|
|
|
|
template <class RT>
|
|
inline RT wmult(Simple_cartesian<RT> *,
|
|
const RT &a, const RT & , const RT & )
|
|
{
|
|
return a;
|
|
}
|
|
|
|
template <class RT>
|
|
inline RT wmult(Simple_cartesian<RT> *, const RT &a,
|
|
const RT & , const RT & , const RT & )
|
|
{
|
|
return a;
|
|
}
|
|
|
|
template <class RT>
|
|
inline RT wmult(Simple_cartesian<RT> *, const RT &a,
|
|
const RT & , const RT & , const RT & , const RT & )
|
|
{
|
|
return a;
|
|
}
|
|
#endif // CGAL_SIMPLE_CARTESIAN_H
|
|
|
|
CGAL_END_NAMESPACE
|
|
|
|
#endif // CGAL_WMULT_H
|