1
0
Fork 0
mirror of https://github.com/gwm17/implot.git synced 2024-11-23 02:38:53 -05:00

header cleanup

This commit is contained in:
epezent 2020-09-06 01:48:47 -05:00
parent 6f3f43c815
commit d23bd30a44
2 changed files with 33 additions and 41 deletions

View File

@ -208,7 +208,7 @@ struct ImPlotLimits {
struct ImPlotStyle {
// item styling variables
float LineWeight; // = 1, item line weight in pixels
ImPlotMarker Marker; // = ImPlotMarker_None, marker specification
int Marker; // = ImPlotMarker_None, marker specification
float MarkerSize; // = 4, marker size in pixels (roughly the marker's "radius")
float MarkerWeight; // = 1, outline weight of markers in pixels
float FillAlpha; // = 1, alpha modifier applied to plot fills

View File

@ -183,8 +183,8 @@ enum ImPlotTimeUnit_ {
};
enum ImPlotTimeFmt_ {
ImPlotTimeFmt_Us, // .428552
ImPlotTimeFmt_SUs, // :29.428552
ImPlotTimeFmt_Us, // .428 552
ImPlotTimeFmt_SUs, // :29.428 552
ImPlotTimeFmt_SMs, // :29.428
ImPlotTimeFmt_S, // :29
ImPlotTimeFmt_HrMinS, // 7:21:29pm
@ -579,21 +579,13 @@ struct ImPlotAxisScale
/// Two part time struct.
struct ImPlotTime {
time_t S;
int Us;
time_t S; // second part
int Us; // microsecond part
ImPlotTime() { S = 0; Us = 0; }
ImPlotTime(time_t s, int us = 0) {
S = s + us / 1000000;
Us = us % 1000000;
}
void RollOver() {
S = S + Us / 1000000;
Us = Us % 1000000;
}
static ImPlotTime FromDouble(double t) {
return ImPlotTime((time_t)t, (int)(t * 1000000 - floor(t) * 1000000));
}
ImPlotTime(time_t s, int us = 0) { S = s + us / 1000000; Us = us % 1000000; }
void RollOver() { S = S + Us / 1000000; Us = Us % 1000000; }
double ToDouble() const { return (double)S + (double)Us / 1000000.0; }
static ImPlotTime FromDouble(double t) { return ImPlotTime((time_t)t, (int)(t * 1000000 - floor(t) * 1000000)); }
};
static inline ImPlotTime operator+(const ImPlotTime& lhs, const ImPlotTime& rhs)
@ -785,7 +777,7 @@ inline T OffsetAndStride(const T* data, int idx, int count, int offset, int stri
// Time Utils
//-----------------------------------------------------------------------------
// NB: These functions only work if there is a currnet context because the
// NB: These functions only work if there is a current ImPlotContext because the
// internal tm struct is owned by the context!
// Returns true if year is leap year (366 days long)