libcamera  v0.4.0
Supporting cameras in Linux since 2019
Public Member Functions | Public Attributes | List of all members
libcamera::ipa::Pwl::Interval Class Reference

Describe an interval in one-dimensional real space. More...

Public Member Functions

 Interval (double _start, double _end)
 Construct an interval. More...
 
bool contains (double value)
 Check if a given value falls within the interval. More...
 
double clamp (double value)
 Clamp a value such that it is within the interval. More...
 
double length () const
 Compute the length of the interval. More...
 

Public Attributes

double start
 Start of the interval.
 
double end
 End of the interval.
 

Detailed Description

Describe an interval in one-dimensional real space.

Constructor & Destructor Documentation

◆ Interval()

libcamera::ipa::Pwl::Interval::Interval ( double  _start,
double  _end 
)
inline

Construct an interval.

Parameters
[in]_startStart of the interval
[in]_endEnd of the interval

Member Function Documentation

◆ clamp()

libcamera::ipa::Pwl::Interval::clamp ( double  value)
inline

Clamp a value such that it is within the interval.

Parameters
[in]valueValue to clamp
Returns
The clamped value

◆ contains()

libcamera::ipa::Pwl::Interval::contains ( double  value)
inline

Check if a given value falls within the interval.

Parameters
[in]valueValue to check
Returns
True if the value falls within the interval, including its bounds, or false otherwise

◆ length()

libcamera::ipa::Pwl::Interval::length ( ) const
inline

Compute the length of the interval.

Returns
The length of the interval

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