From cb50ec10591c0e0e4b9915e642bc50d3d8d1fd0a Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Sat, 2 Nov 2024 21:27:47 +0000 Subject: Apply new clang-formatting --- src/ProbabDistrib.h | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'src/ProbabDistrib.h') diff --git a/src/ProbabDistrib.h b/src/ProbabDistrib.h index a051c29d3..d0611e6d3 100644 --- a/src/ProbabDistrib.h +++ b/src/ProbabDistrib.h @@ -28,26 +28,26 @@ Usage: class cProbabDistrib { -public: + public: class cPoint { - public: + public: int m_Value; int m_Probability; cPoint(int a_Value, int a_Probability) : - m_Value(a_Value), - m_Probability(a_Probability) + m_Value(a_Value), m_Probability(a_Probability) { } - } ; + }; typedef std::vector cPoints; cProbabDistrib(int a_MaxValue); - /** Sets the distribution curve using an array of [value, probability] points, linearly interpolated. a_Points must not be empty. */ + /** Sets the distribution curve using an array of [value, probability] points, linearly interpolated. a_Points must + * not be empty. */ void SetPoints(const cPoints & a_Points); /** Sets the distribution curve using a definition string; returns true on successful parse */ @@ -61,8 +61,7 @@ public: int GetSum(void) const { return m_Sum; } -protected: - + protected: int m_MaxValue; /** Cumulative probability of the values, sorted, for fast bsearch lookup */ @@ -70,8 +69,4 @@ protected: /** Sum of all the probabilities across all values in the domain; -1 if not set */ int m_Sum; -} ; - - - - +}; -- cgit v1.2.3