Author Topic: Obj2blb - inefficiency with decimals?  (Read 1080 times)

A friend has brought it to my attention that when you create a brick with the Obj2blb exporter, instead of the expected
 2.5
 1
 4
 1.1

you get something like
 2.499999
 1.000001
 3.999999
 1.111111

Is there any sort of modeling problem that causes this or is the program just bad?

Don't worry about it. There won't be a difference.

Don't worry about it. There won't be a difference.
Besides file size.



Well, if you're working on some big project that involves bricks with ~400 or 500 faces, it's going to make a difference. Anyways, I don't want to know whether it's worth it, I want to know if there's a way to fix this besides writing a program to sort through it.

I want to know if there's a way to fix this besides writing a program to sort through it.
Use an already made program to sort through it. I use Notepad++ find and replace. Find 3.999999, replace with 4.0, click replace all.

Well, if you're working on some big project that involves bricks with ~400 or 500 faces, it's going to make a difference. Anyways, I don't want to know whether it's worth it, I want to know if there's a way to fix this besides writing a program to sort through it.
i can't imagine why you would have a brick that has that many faces unless you were making some kind of building brick

Use an already made program to sort through it. I use Notepad++ find and replace. Find 3.999999, replace with 4.0, click replace all.
This would get unbelievably tedious. Writing a program to just round all the numbers up/down would be easy, but I don't want to have to use anything except for Blender and the converter.

This would get unbelievably tedious. Writing a program to just round all the numbers up/down would be easy, but I don't want to have to use anything except for Blender and the converter.
Make a blockland script to round numbers in a text file to one decimal place?