Community
Maya Programming
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya SDK topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Maya bug?

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
359 Views, 3 Replies

Maya bug?

global proc AAA()
{
float $i = 0.0;
while($i <= 10.0)
{
float $k = trunc($i);
float $j = $i -$k;
if($j < 0.0001)
$j = 0;

print ($i + " - " + $k + " = " + $j + "\n");
$i = $i + 0.2;
}
};
AAA();

0 - 0 = 0
0.2 - 0 = 0.2
0.4 - 0 = 0.4
0.6 - 0 = 0.6
0.8 - 0 = 0.8
1 - 1 = 0
1.2 - 1 = 0.2
1.4 - 1 = 0.4
1.6 - 1 = 0.6
1.8 - 1 = 0.8
2 - 1 = 1
2.2 - 2 = 0.2
2.4 - 2 = 0.4
2.6 - 2 = 0.6
2.8 - 2 = 0.8
3 - 3 = 0
3.2 - 3 = 0.2
3.4 - 3 = 0.4
3.6 - 3 = 0.6
3.8 - 3 = 0.8
4 - 4 = 0
4.2 - 4 = 0.2
4.4 - 4 = 0.4
4.6 - 4 = 0.6
4.8 - 4 = 0.8
5 - 5 = 0
5.2 - 5 = 0.2
5.4 - 5 = 0.4
5.6 - 5 = 0.6
5.8 - 5 = 0.8
6 - 6 = 0
6.2 - 6 = 0.2
6.4 - 6 = 0.4
6.6 - 6 = 0.6
6.8 - 6 = 0.8
7 - 7 = 0
7.2 - 7 = 0.2
7.4 - 7 = 0.4
7.6 - 7 = 0.6
7.8 - 7 = 0.8
8 - 8 = 0
8.2 - 8 = 0.2
8.4 - 8 = 0.4
8.6 - 8 = 0.6
8.8 - 8 = 0.8
9 - 9 = 0
9.2 - 9 = 0.2
9.4 - 9 = 0.4
9.6 - 9 = 0.6
9.8 - 9 = 0.8
10 - 9 = 1

----------------------------------------------
2 - 1 = 1 ==> 2 - 2 = 0
10 - 9 = 1 ==> 10 - 10 = 0
3 REPLIES 3
Message 2 of 4
n8skow
in reply to: Anonymous

What is your question?
Message 3 of 4
Anonymous
in reply to: Anonymous

Good Question 🙂
Message 4 of 4
Anifex09
in reply to: Anonymous

Always make sure you get enough sleep......................................

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report