Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Seitosh
Seitosh
Commits
718f5f71
Commit
718f5f71
authored
Jan 05, 2017
by
thomas.forbriger
Browse files
ts/stuploxx [FIX]: properly handle picks of nagtive abscissa values
parent
3c84502b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/ts/stuploxx/scaling.cc
View file @
718f5f71
...
...
@@ -29,11 +29,12 @@
*
* REVISIONS and CHANGES
* - 29/02/2008 V1.0 Thomas Forbriger
* - 05/01/2017 V1.1 properly handle negative values on abszissa
*
* ============================================================================
*/
#define STUPLO_SCALING_CC_VERSION \
"STUPLO_SCALING_CC V1.
0
"
"STUPLO_SCALING_CC V1.
1
"
#include <libtime++.h>
#include "scaling.h"
...
...
@@ -68,10 +69,24 @@ namespace stuplo {
void
PanelTime
::
setrange
(
const
pgplot
::
Trange
&
range
)
{
libtime
::
TRelativeTime
begin
=
libtime
::
double2time
(
range
.
min
);
libtime
::
TRelativeTime
end
=
libtime
::
double2time
(
range
.
max
);
libtime
::
TAbsoluteTime
abegin
=
Mreferencetime
+
begin
;
libtime
::
TAbsoluteTime
aend
=
Mreferencetime
+
end
;
libtime
::
TAbsoluteTime
abegin
;
libtime
::
TAbsoluteTime
aend
;
if
(
range
.
min
<
0
)
{
abegin
=
Mreferencetime
-
libtime
::
double2time
(
-
range
.
min
);
}
else
{
abegin
=
Mreferencetime
+
libtime
::
double2time
(
range
.
min
);
}
if
(
range
.
max
<
0
)
{
aend
=
Mreferencetime
-
libtime
::
double2time
(
-
range
.
max
);
}
else
{
aend
=
Mreferencetime
+
libtime
::
double2time
(
range
.
max
);
}
this
->
setrange
(
libtime
::
TRange
(
abegin
,
aend
));
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment