It would be nice to not have to decide whether to use floats or integers. Currently, it seems to me that this is impossible -- IntTriangulation works only on i32, whereas Triangulator::triangulate() requires the scalar type to implement FloatNumber, which is currently only implemented for f32 and f64.
It should be possible to use traits to make the current floating-point triangulation interface more generic to also accept integers by implementing the current conversion from and to floats as an identity map for integers.
This would be useful for me because I have a preference for writing code that is generic over both integers and floats to cover more applications. Though in computer graphics, video games, and mechanical CADs floating-point coordinates have been the usual choice for over two decades, fixed-point integer coordinates do not suffer from numerical inrobustness and continue to be widely used in EDA software.
It would be nice to not have to decide whether to use floats or integers. Currently, it seems to me that this is impossible --
IntTriangulationworks only oni32, whereasTriangulator::triangulate()requires the scalar type to implementFloatNumber, which is currently only implemented forf32andf64.It should be possible to use traits to make the current floating-point triangulation interface more generic to also accept integers by implementing the current conversion from and to floats as an identity map for integers.
This would be useful for me because I have a preference for writing code that is generic over both integers and floats to cover more applications. Though in computer graphics, video games, and mechanical CADs floating-point coordinates have been the usual choice for over two decades, fixed-point integer coordinates do not suffer from numerical inrobustness and continue to be widely used in EDA software.