Skip to content

Commit 1a1f16c

Browse files
authored
Merge branch 'beltoforion:master' into master
2 parents ece7059 + 0c29684 commit 1a1f16c

4 files changed

Lines changed: 7 additions & 3 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ option(ENABLE_WIDE_CHAR "Enable wide character support" OFF)
2323
option(BUILD_SHARED_LIBS "Build shared/static libs" ON)
2424

2525
if(ENABLE_OPENMP)
26-
find_package(OpenMP REQUIRED)
26+
find_package(OpenMP REQUIRED COMPONENTS CXX)
2727
endif()
2828

2929
# Credit: https://stackoverflow.com/questions/2368811/how-to-set-warning-level-in-cmake/3818084

appveyor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
version: 1.0.{build}
2-
os: Visual Studio 2015
2+
os: Visual Studio 2022
33
clone_folder: C:\projects\muParser
44
test: off
55
branches:
66
only:
77
- master
88
environment:
99
matrix:
10-
- CMAKE_PLATFORM: Visual Studio 14 2015
10+
- CMAKE_PLATFORM: Visual Studio 17 2022
1111
build_script:
1212
- cmake -LAH -G "%CMAKE_PLATFORM%" -DCMAKE_INSTALL_PREFIX="%CD:\=/%/install" .
1313
- cmake --build . --config Release --target install

include/muParserTemplateMagic.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,15 @@ namespace mu
118118
static T Sin(T v) { return sin(v); }
119119
static T Cos(T v) { return cos(v); }
120120
static T Tan(T v) { return tan(v); }
121+
static T Cot(T v) { return 1.0 / tan(v); }
121122
static T ASin(T v) { return asin(v); }
122123
static T ACos(T v) { return acos(v); }
123124
static T ATan(T v) { return atan(v); }
124125
static T ATan2(T v1, T v2) { return atan2(v1, v2); }
125126
static T Sinh(T v) { return sinh(v); }
126127
static T Cosh(T v) { return cosh(v); }
127128
static T Tanh(T v) { return tanh(v); }
129+
static T Coth(T v) { return 1.0 / tanh(v); }
128130
static T ASinh(T v) { return log(v + sqrt(v * v + 1)); }
129131
static T ACosh(T v) { return log(v + sqrt(v * v - 1)); }
130132
static T ATanh(T v) { return ((T)0.5 * log((1 + v) / (1 - v))); }

src/muParser.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ namespace mu
148148
DefineFun(_T("sin"), MathImpl<value_type>::Sin);
149149
DefineFun(_T("cos"), MathImpl<value_type>::Cos);
150150
DefineFun(_T("tan"), MathImpl<value_type>::Tan);
151+
DefineFun(_T("cot"), MathImpl<value_type>::Cot);
151152
// arcus functions
152153
DefineFun(_T("asin"), MathImpl<value_type>::ASin);
153154
DefineFun(_T("acos"), MathImpl<value_type>::ACos);
@@ -157,6 +158,7 @@ namespace mu
157158
DefineFun(_T("sinh"), MathImpl<value_type>::Sinh);
158159
DefineFun(_T("cosh"), MathImpl<value_type>::Cosh);
159160
DefineFun(_T("tanh"), MathImpl<value_type>::Tanh);
161+
DefineFun(_T("coth"), MathImpl<value_type>::Coth);
160162
// arcus hyperbolic functions
161163
DefineFun(_T("asinh"), MathImpl<value_type>::ASinh);
162164
DefineFun(_T("acosh"), MathImpl<value_type>::ACosh);

0 commit comments

Comments
 (0)