61 lines
1.6 KiB
C++
61 lines
1.6 KiB
C++
/**++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
*
|
|
* PANIC
|
|
* Portable Algorithms and Numerics In C++
|
|
*
|
|
* Scientific computing from scratch, with feeling.
|
|
*
|
|
* Copyright (c) 2026 Michelle Bausager
|
|
*
|
|
* This file is part of PANIC.
|
|
*
|
|
* PANIC is free software licensed under the GNU General Public License v3.0 or later.
|
|
* You may redistribute and/or modify it under the terms of the GPL.
|
|
*
|
|
* PANIC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
* See the LICENSE file for the full license text.
|
|
*
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
*
|
|
*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
*
|
|
* Project Name: PANIC
|
|
* Module Name: math
|
|
* File Name: cos.hpp
|
|
* Revision: 0.1.0
|
|
* Date: 29-07-2026
|
|
* Author: Michelle Bausager
|
|
*
|
|
* Description:
|
|
* Functions to calculate cossinus of x;
|
|
* This uses panic::math::sin
|
|
*
|
|
*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
|
|
#pragma once
|
|
|
|
|
|
namespace panic{
|
|
namespace math{
|
|
|
|
|
|
/**
|
|
* @brief Calculates cos value of x
|
|
*
|
|
* Computes:
|
|
* @code
|
|
* c = cos(a)
|
|
* @endcode
|
|
* @tparam T Numeric element type.
|
|
* @param x Real input value
|
|
*
|
|
* @return Cosinus of x
|
|
*
|
|
* @note This function is omp-friendly
|
|
*/
|
|
template <typename T>
|
|
T cos(const T x);
|
|
|
|
|
|
} // namespace math
|
|
} // namespace panic
|