ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
CCMath.cpp
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #include <pybind11/pybind11.h>
9 
10 #include <CVMath.h>
11 
12 namespace py = pybind11;
13 using namespace pybind11::literals;
14 
15 void define_CCMath(py::module &cccorelib)
16 {
17  cccorelib.def("LessThanEpsilon", static_cast<bool (*)(double)>(&cloudViewer::LessThanEpsilon));
18  cccorelib.def("GreaterThanEpsilon", static_cast<bool (*)(double)>(&cloudViewer::GreaterThanEpsilon));
19  cccorelib.def("RadiansToDegrees", static_cast<double (*)(double)>(&cloudViewer::RadiansToDegrees));
20  cccorelib.def("DegreesToRadians", static_cast<double (*)(double)>(&cloudViewer::DegreesToRadians));
21 }
void define_CCMath(py::module &cccorelib)
Definition: CCMath.cpp:15
float RadiansToDegrees(int radians)
Convert radians to degrees.
Definition: CVMath.h:71
bool GreaterThanEpsilon(float x)
Test a floating point number against our epsilon (a very small number).
Definition: CVMath.h:37
float DegreesToRadians(int degrees)
Convert degrees to radians.
Definition: CVMath.h:98
bool LessThanEpsilon(float x)
Test a floating point number against our epsilon (a very small number).
Definition: CVMath.h:23