Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Tobias WEBER
in20tools_old
Commits
74a1541a
Commit
74a1541a
authored
Mar 13, 2019
by
Tobias WEBER
Browse files
more bugfixes
parent
67235967
Changes
3
Hide whitespace changes
Inline
Side-by-side
libs/_cxx20/math_algos.h
View file @
74a1541a
...
...
@@ -3768,8 +3768,10 @@ requires is_vec<t_vec> && is_mat<t_mat>
for
(
std
::
size_t
i
=
0
;
i
<
newatom
.
size
();
++
i
)
{
newatom
[
i
]
=
std
::
fmod
(
newatom
[
i
],
1.
);
while
(
newatom
[
i
]
<
-
0.5
)
newatom
[
i
]
+=
1.
;
while
(
newatom
[
i
]
>=
0.5
)
newatom
[
i
]
-=
1.
;
if
(
newatom
[
i
]
<
-
0.5
)
newatom
[
i
]
+=
std
::
abs
(
std
::
floor
(
newatom
[
i
]));
if
(
newatom
[
i
]
>=
0.5
)
newatom
[
i
]
-=
std
::
abs
(
std
::
ceil
(
newatom
[
i
]));
}
}
...
...
tools/magstructfact/magstructfact.cpp
View file @
74a1541a
...
...
@@ -2027,8 +2027,8 @@ void MagStructFactDlg::PickerIntersection(const t_vec3_gl* pos, std::size_t objI
t_vec
r
=
m
::
create
<
t_vec
>
({
0
,
0
,
0
});
std
::
istringstream
{
itemX
->
text
().
toStdString
()}
>>
r
[
0
];
std
::
istringstream
{
item
X
->
text
().
toStdString
()}
>>
r
[
1
];
std
::
istringstream
{
item
X
->
text
().
toStdString
()}
>>
r
[
2
];
std
::
istringstream
{
item
Y
->
text
().
toStdString
()}
>>
r
[
1
];
std
::
istringstream
{
item
Z
->
text
().
toStdString
()}
>>
r
[
2
];
t_vec
rlab
=
m_crystA
*
r
;
std
::
ostringstream
ostr
;
ostr
.
precision
(
g_prec
);
...
...
tools/structfact/structfact.cpp
View file @
74a1541a
...
...
@@ -1382,8 +1382,8 @@ void StructFactDlg::PickerIntersection(const t_vec3_gl* pos, std::size_t objIdx,
t_vec
r
=
m
::
create
<
t_vec
>
({
0
,
0
,
0
});
std
::
istringstream
{
itemX
->
text
().
toStdString
()}
>>
r
[
0
];
std
::
istringstream
{
item
X
->
text
().
toStdString
()}
>>
r
[
1
];
std
::
istringstream
{
item
X
->
text
().
toStdString
()}
>>
r
[
2
];
std
::
istringstream
{
item
Y
->
text
().
toStdString
()}
>>
r
[
1
];
std
::
istringstream
{
item
Z
->
text
().
toStdString
()}
>>
r
[
2
];
t_vec
rlab
=
m_crystA
*
r
;
std
::
ostringstream
ostr
;
ostr
.
precision
(
g_prec
);
...
...
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