BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
GUI::RealSpace::Range Struct Reference

Description

Range of float.

Definition at line 61 of file def.h.

Public Member Functions

 Range (float, float)
 
float mid () const
 
float size () const
 

Public Attributes

float max
 
float min
 

Constructor & Destructor Documentation

◆ Range()

GUI::RealSpace::Range::Range ( float  r1,
float  r2 
)

Definition at line 103 of file def.cpp.

104  : min(qMin(r1, r2))
105  , max(qMax(r1, r2))
106 {
107 }

Member Function Documentation

◆ mid()

float GUI::RealSpace::Range::mid ( ) const

Definition at line 114 of file def.cpp.

115 {
116  return (min + max) / 2;
117 }

References max, and min.

Referenced by GUI::RealSpace::VectorRange::mid().

◆ size()

float GUI::RealSpace::Range::size ( ) const

Definition at line 109 of file def.cpp.

110 {
111  return max - min;
112 }

References max, and min.

Referenced by GUI::RealSpace::VectorRange::length(), and GUI::RealSpace::VectorRange::size().

Member Data Documentation

◆ max

float GUI::RealSpace::Range::max

Definition at line 62 of file def.h.

Referenced by mid(), and size().

◆ min

float GUI::RealSpace::Range::min

Definition at line 62 of file def.h.

Referenced by mid(), and size().


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