LibreOffice Module basegfx (master) 1
Namespaces | Functions
ftools.hxx File Reference
#include <rtl/math.h>
#include <cmath>
#include <math.h>
#include <basegfx/basegfxdllapi.h>
#include <limits>
#include <algorithm>
Include dependency graph for ftools.hxx:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  basegfx
 
namespace  basegfx::fTools
 

Functions

sal_Int32 basegfx::fround (double fVal)
 Round double to nearest integer. More...
 
sal_Int64 basegfx::fround64 (double fVal)
 Round double to nearest integer. More...
 
double basegfx::pruneScaleValue (double fVal)
 Prune a small epsilon range around zero. More...
 
template<int DegMultiple = 1>
constexpr double basegfx::deg2rad (double v)
 Convert value from degrees to radians. More...
 
template<int DegMultiple = 1>
constexpr double basegfx::rad2deg (double v)
 Convert value radians to degrees. More...
 
double basegfx::snapToNearestMultiple (double v, const double fStep)
 Snap v to nearest multiple of fStep, from negative and positive side. More...
 
double basegfx::snapToZeroRange (double v, double fWidth)
 Snap v to the range [0.0 . More...
 
double basegfx::snapToRange (double v, double fLow, double fHigh)
 Snap v to the range [fLow . More...
 
double basegfx::copySign (double fValue, double fSignCarrier)
 return fValue with the sign of fSignCarrier, thus evtl. More...
 
double basegfx::normalizeToRange (double v, const double fRange)
 RotateFlyFrame3: Normalize to range defined by [0.0 ... fRange[, independent if v is positive or negative. More...
 
double basegfx::fTools::getSmallValue ()
 Get threshold value for equalZero and friends. More...
 
template<typename T , std::enable_if_t< std::is_floating_point_v< T >, int > = 0>
bool basegfx::fTools::equalZero (const T &rfVal)
 Compare against small value. More...
 
template<typename T , std::enable_if_t< std::is_floating_point_v< T >, int > = 0>
bool basegfx::fTools::equalZero (const T &rfVal, const T &rfSmallValue)
 Compare against given small value. More...
 
template<typename T , std::enable_if_t< std::is_floating_point_v< T >, int > = 0>
bool basegfx::fTools::equal (T const &rfValA, T const &rfValB)
 
template<typename T , std::enable_if_t< std::is_floating_point_v< T >, int > = 0>
bool basegfx::fTools::equal (const T &rfValA, const T &rfValB, const T &rfSmallValue)
 
template<typename T , std::enable_if_t< std::is_floating_point_v< T >, int > = 0>
bool basegfx::fTools::less (const T &rfValA, const T &rfValB)
 
template<typename T , std::enable_if_t< std::is_floating_point_v< T >, int > = 0>
bool basegfx::fTools::lessOrEqual (const T &rfValA, const T &rfValB)
 
template<typename T , std::enable_if_t< std::is_floating_point_v< T >, int > = 0>
bool basegfx::fTools::more (const T &rfValA, const T &rfValB)
 
template<typename T , std::enable_if_t< std::is_floating_point_v< T >, int > = 0>
bool basegfx::fTools::moreOrEqual (const T &rfValA, const T &rfValB)
 
template<typename T , std::enable_if_t< std::is_floating_point_v< T >, int > = 0>
bool basegfx::fTools::betweenOrEqualEither (const T &rfValA, const T &rfValB, const T &rfValC)