210 return x >= EnumLimits<Enum>::First and x <= EnumLimits<Enum>::Last; |
211 return x >= EnumLimits<Enum>::First and x <= EnumLimits<Enum>::Last; |
211 } |
212 } |
212 |
213 |
213 double getRadialPoint(int segment, int divisions, double(*func)(double)); |
214 double getRadialPoint(int segment, int divisions, double(*func)(double)); |
214 QVector<QLineF> makeCircle(int segments, int divisions, double radius); |
215 QVector<QLineF> makeCircle(int segments, int divisions, double radius); |
|
216 |
|
217 // |
|
218 // Get the amount of elements in something. |
|
219 // |
|
220 template<typename T, size_t N> |
|
221 int length(T(&)[N]) |
|
222 { |
|
223 return N; |
|
224 } |
|
225 |
|
226 static inline int length(const QString& string) |
|
227 { |
|
228 return string.size(); |
|
229 } |
|
230 |
|
231 template<typename T> |
|
232 int length(const QVector<T>& vector) |
|
233 { |
|
234 return vector.size(); |
|
235 } |