LibreOffice Module tools (master) 1
Typedefs | Functions | Variables
degree.hxx File Reference
#include <sal/config.h>
#include <basegfx/numeric/ftools.hxx>
#include <sal/types.h>
#include <o3tl/strong_int.hxx>
#include <o3tl/unit_conversion.hxx>
#include <cstdlib>
#include <math.h>
#include <numeric>
Include dependency graph for degree.hxx:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

template<typename I , int N>
using Degree = o3tl::strong_int< I, FractionTag< N > >
 
typedef Degree< sal_Int16, 10 > Degree10
 tenths of a Degree, normally rotation More...
 
typedef Degree< sal_Int32, 100 > Degree100
 hundredths of a Degree, normally rotation More...
 

Functions

template<typename I , int N>
char(& NofDegree (Degree< I, N >))[N]
 
constexpr Degree10 operator""_deg10 (unsigned long long n)
 custom literal More...
 
Degree100 abs (Degree100 x)
 
constexpr Degree100 operator""_deg100 (unsigned long long n)
 custom literal More...
 
template<class To , typename IofFrom , int NofFrom>
To to (Degree< IofFrom, NofFrom > x)
 conversion functions More...
 
template<class D >
double toRadians (D x)
 
template<class D >
double toDegrees (D x)
 

Variables

template<class D >
constexpr int Nof = sizeof(NofDegree(std::declval<D>()))
 

Typedef Documentation

◆ Degree

template<typename I , int N>
using Degree = o3tl::strong_int<I, FractionTag<N> >

Definition at line 23 of file degree.hxx.

◆ Degree10

typedef Degree<sal_Int16, 10> Degree10

tenths of a Degree, normally rotation

Definition at line 30 of file degree.hxx.

◆ Degree100

typedef Degree<sal_Int32, 100> Degree100

hundredths of a Degree, normally rotation

Definition at line 36 of file degree.hxx.

Function Documentation

◆ abs()

Degree100 abs ( Degree100  x)
inline

◆ NofDegree()

template<typename I , int N>
char(& NofDegree ( Degree< I, N ) )[N]

References N.

◆ operator""_deg10()

constexpr Degree10 operator""_deg10 ( unsigned long long  n)
constexpr

custom literal

Definition at line 33 of file degree.hxx.

References n.

◆ operator""_deg100()

constexpr Degree100 operator""_deg100 ( unsigned long long  n)
constexpr

custom literal

Definition at line 46 of file degree.hxx.

References n.

◆ to()

template<class To , typename IofFrom , int NofFrom>
To to ( Degree< IofFrom, NofFrom >  x)
inline

conversion functions

Definition at line 50 of file degree.hxx.

References o3tl::convert(), d, m, To, and x.

Referenced by conversionFract().

◆ toDegrees()

template<class D >
double toDegrees ( x)
inline

Definition at line 58 of file degree.hxx.

References x.

◆ toRadians()

template<class D >
double toRadians ( x)
inline

Definition at line 57 of file degree.hxx.

References x.

Referenced by tools::Polygon::Rotate(), tools::PolyPolygon::Rotate(), and Point::RotateAround().

Variable Documentation

◆ Nof

template<class D >
constexpr int Nof = sizeof(NofDegree(std::declval<D>()))
constexpr

Definition at line 27 of file degree.hxx.