/*
  Copyright (C) 2016-2026 Dan Casarin (https://www.kfrlib.com)
  This file is part of KFR

  KFR is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 2 of the License, or
  (at your option) any later version.

  KFR 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
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with KFR.

  If GPL is not suitable for your project, you must purchase a commercial license to use KFR.
  Buying a commercial license is mandatory as soon as you develop commercial activities without
  disclosing the source code of your own applications.
  See https://www.kfrlib.com for details.
 */
#pragma once

#include "impl/asin_acos.hpp"

namespace kfr
{
inline namespace KFR_ARCH_NAME
{

/**
 * @brief Returns the arc sine of x. The returned angle is in the range \f$-\pi/2\f$ through \f$\pi/2\f$.
 *
 * @param x Value whose arc sine is computed, in the range [-1, 1].
 * @return Arc sine of @p x, in radians, in the range \f$[-\pi/2, \pi/2]\f$.
 */
template <numeric T1>
KFR_INTRINSIC flt_type<T1> asin(const T1& x)
{
    return intr::asin(x);
}
/**
 * @brief Returns the arc cosine of x. The returned angle is in the range 0 through \f$\pi\f$.
 *
 * @param x Value whose arc cosine is computed, in the range [-1, 1].
 * @return Arc cosine of @p x, in radians, in the range \f$[0, \pi]\f$.
 */
template <numeric T1>
KFR_INTRINSIC flt_type<T1> acos(const T1& x)
{
    return intr::acos(x);
}
} // namespace KFR_ARCH_NAME

} // namespace kfr
