mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Added some trigonometry functions that are missing from MSVC's C library.
This commit is contained in:
parent
a8c754f06c
commit
c70d98dbdd
1 changed files with 6 additions and 0 deletions
|
|
@ -295,6 +295,12 @@ inline int64 abs64 (const int64 n) noexcept
|
|||
return (n >= 0) ? n : -n;
|
||||
}
|
||||
|
||||
#if JUCE_MSVC && ! defined (DOXYGEN) // The MSVC libraries omit these functions for some reason...
|
||||
template<typename Type> Type asinh (Type x) noexcept { return std::log (x + std::sqrt (x * x + (Type) 1)); }
|
||||
template<typename Type> Type acosh (Type x) noexcept { return std::log (x + std::sqrt (x * x - (Type) 1)); }
|
||||
template<typename Type> Type atanh (Type x) noexcept { return (std::log (x + (Type) 1) - std::log (((Type) 1) - x)) / (Type) 2; }
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
/** A predefined value for Pi, at double-precision.
|
||||
@see float_Pi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue