need to enum all points on a line between two points defined by coords p1(x1,y1) p2(x2,y2) which count of digit numbers are equal to predefined number:
e.g. take a points with two digits only
(1.234456, 2.345567) - not meets a requirement
(2.34, 5.4) - meets a requirement
(3.45,6.67567567567) - not meets the requirement
this looks clear in terms of arithmetic. 1. find a function for that line like y = A*x + B 2. go throu all X numbers between first and second points with a step of 0.01 and check that Y is also having two digits.
but the problem is in understanding e.g. number : 5.54999999 - doesn't really accept my requirement or just wrong representation of 5.55?
any idea how to solve the problem?