FuncSketch
Loading...
Searching...
No Matches
func_sketch::plotter::PlotRange Class Reference

Class of a range of a plot. More...

#include <func_sketch/plotter/plot_range.h>

Collaboration diagram for func_sketch::plotter::PlotRange:

Public Member Functions

 PlotRange (const std::pair< double, double > &x_range, const std::pair< double, double > &y_range)
 Constructor.
auto x_range () const noexcept -> std::pair< double, double >
 Get X range.
auto y_range () const noexcept -> std::pair< double, double >
 Get Y range.
bool contains (const Point &point) const noexcept
 Check if a point is in the range.

Private Attributes

std::pair< double, double > x_range_
 X range.
std::pair< double, double > y_range_
 Y range.

Detailed Description

Class of a range of a plot.

Definition at line 35 of file plot_range.h.

Constructor & Destructor Documentation

◆ PlotRange()

func_sketch::plotter::PlotRange::PlotRange ( const std::pair< double, double > & x_range,
const std::pair< double, double > & y_range )
inline

Constructor.

Parameters
[in]x_rangeX range.
[in]y_rangeY range.

Definition at line 43 of file plot_range.h.

Member Function Documentation

◆ x_range()

auto func_sketch::plotter::PlotRange::x_range ( ) const->std::pair< double, double >
inlinenodiscardnoexcept

Get X range.

Returns
X range.

Definition at line 65 of file plot_range.h.

◆ y_range()

auto func_sketch::plotter::PlotRange::y_range ( ) const->std::pair< double, double >
inlinenodiscardnoexcept

Get Y range.

Returns
Y range.

Definition at line 74 of file plot_range.h.

◆ contains()

bool func_sketch::plotter::PlotRange::contains ( const Point & point) const
inlinenodiscardnoexcept

Check if a point is in the range.

Parameters
[in]pointPoint to check.
Return values
trueThe point is in the range.
falseThe point is not in the range.

Definition at line 85 of file plot_range.h.

Member Data Documentation

◆ x_range_

std::pair<double, double> func_sketch::plotter::PlotRange::x_range_
private

X range.

Definition at line 93 of file plot_range.h.

◆ y_range_

std::pair<double, double> func_sketch::plotter::PlotRange::y_range_
private

Y range.

Definition at line 96 of file plot_range.h.


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