dimanche 13 novembre 2016

Values and if's

in my code i'm counting contect and circuit in two polygons. Everything is all right but when i want to printf result with if content pol1 == content pol2 it will show pol1 > pol2 or pol2 < pol2 ... i tried to printf my contents of polygons and it shows 1st content is 6.0000000 and 2nd is 6.0000002 ... i want to round it to two decimal places but when it ends 6.00 i want to printf with int 6, and if content is 6.78 i want to printf 6.78 ... same problem with polygons circuit ... sorry for my english ... thanks for help for everyone

Aucun commentaire:

Enregistrer un commentaire