Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Games
Palapeli
Commits
398d3f1e
Commit
398d3f1e
authored
Dec 27, 2009
by
Adriaan de Groot
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disambiguate sqrt() call on an integer argument
svn path=/trunk/KDE/kdegames/palapeli/; revision=1066563
parent
3d8c3872
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/engine/scene.cpp
src/engine/scene.cpp
+1
-1
No files found.
src/engine/scene.cpp
View file @
398d3f1e
...
...
@@ -191,7 +191,7 @@ void Palapeli::Scene::finishLoading()
partAreaSize
*=
1.3
;
//more space for each part
//step 2: place parts in a grid in random order
QList
<
Palapeli
::
Part
*>
partPool
(
m_parts
);
const
int
xCount
=
floor
(
sqrt
(
partPool
.
count
()));
const
int
xCount
=
floor
(
sqrt
(
(
float
)
partPool
.
count
()));
for
(
int
y
=
0
;
!
partPool
.
isEmpty
();
++
y
)
{
for
(
int
x
=
0
;
x
<
xCount
&&
!
partPool
.
isEmpty
();
++
x
)
...
...
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