Krita Source Code Documentation
Loading...
Searching...
No Matches
KisATanTable Struct Reference

Public Member Functions

 KisATanTable ()
 
 ~KisATanTable ()
 

Public Attributes

qreal * ATanTable
 
quint32 NUM_ATAN_ENTRIES
 

Detailed Description

Definition at line 23 of file kis_fast_math.cpp.

Constructor & Destructor Documentation

◆ KisATanTable()

KisATanTable::KisATanTable ( )
inline

Definition at line 25 of file kis_fast_math.cpp.

25 {
26 qreal nf = ::sqrt(MAX_SECOND_DERIV_IN_RANGE / (8 * MAX_ERROR));
27 NUM_ATAN_ENTRIES = int(nf) + 1;
28 // Build table
29 qreal y = 10.0;
30 qreal x;
31 ATanTable = new qreal[NUM_ATAN_ENTRIES + 1];
32 ATanTable[0] = 0.0;
33 for (quint32 i = 1; i <= NUM_ATAN_ENTRIES; i++) {
34 x = (y / i) * NUM_ATAN_ENTRIES;
35 ATanTable[i] = (qreal)::atan2(y, x);
36 }
37
38 }
const qreal MAX_SECOND_DERIV_IN_RANGE
const qreal MAX_ERROR
precision
quint32 NUM_ATAN_ENTRIES

References ATanTable, MAX_ERROR, MAX_SECOND_DERIV_IN_RANGE, and NUM_ATAN_ENTRIES.

◆ ~KisATanTable()

KisATanTable::~KisATanTable ( )
inline

Definition at line 40 of file kis_fast_math.cpp.

40 {
41 delete [] ATanTable;
42 }

References ATanTable.

Member Data Documentation

◆ ATanTable

qreal* KisATanTable::ATanTable

Definition at line 45 of file kis_fast_math.cpp.

◆ NUM_ATAN_ENTRIES

quint32 KisATanTable::NUM_ATAN_ENTRIES

Definition at line 44 of file kis_fast_math.cpp.


The documentation for this struct was generated from the following file: