Kstars

focusfwhm.cpp
1#include "focusfwhm.h"
2#include <ekos_focus_debug.h>
3
4namespace Ekos
5{
6
7FocusFWHM::FocusFWHM(Mathematics::RobustStatistics::ScaleCalculation scaleCalc)
8{
9 m_ScaleCalc = scaleCalc;
10}
11
12FocusFWHM::~FocusFWHM()
13{
14}
15
16// Returns true if two rectangular boxes (b1, b2) overlap.
17bool FocusFWHM::boxOverlap(const QPair<int, int> b1Start, const QPair<int, int> b1End, const QPair<int, int> b2Start,
18 const QPair<int, int> b2End)
19{
20 // Check the "x" coordinate held in the first element of the pair
21 if (b1Start.first > b2End.first || b2Start.first > b1End.first)
22 return false;
23
24 // Check the "y" coordinate held in the second element of the pair
25 if (b1Start.second > b2End.second || b2Start.second > b1End.second)
26 return false;
27
28 return true;
29}
30
31} // namespace
Ekos is an advanced Astrophotography tool for Linux.
Definition align.cpp:83
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:16:40 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.