Use template type FloatType in the cast.
This commit is contained in:
		@@ -531,7 +531,7 @@ int AppropriateResolution(FloatType val) {
 | 
				
			|||||||
    } else if (val >= 0.0001) {
 | 
					    } else if (val >= 0.0001) {
 | 
				
			||||||
      mulfor6 = 1e9;
 | 
					      mulfor6 = 1e9;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    if (static_cast<float>(static_cast<int32_t>(val * mulfor6 + 0.5)) /
 | 
					    if (static_cast<FloatType>(static_cast<int32_t>(val * mulfor6 + 0.5)) /
 | 
				
			||||||
            mulfor6 ==
 | 
					            mulfor6 ==
 | 
				
			||||||
        val)
 | 
					        val)
 | 
				
			||||||
      return 6;
 | 
					      return 6;
 | 
				
			||||||
@@ -546,7 +546,7 @@ int AppropriateResolution(FloatType val) {
 | 
				
			|||||||
    } else if (val >= 1e6) {  // 1,000,000 to 9,999,999
 | 
					    } else if (val >= 1e6) {  // 1,000,000 to 9,999,999
 | 
				
			||||||
      divfor6 = 10;
 | 
					      divfor6 = 10;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    if (static_cast<float>(static_cast<int32_t>(val / divfor6 + 0.5)) *
 | 
					    if (static_cast<FloatType>(static_cast<int32_t>(val / divfor6 + 0.5)) *
 | 
				
			||||||
            divfor6 ==
 | 
					            divfor6 ==
 | 
				
			||||||
        val)
 | 
					        val)
 | 
				
			||||||
      return 6;
 | 
					      return 6;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user