BHoM / BHoM_Engine

Internal manipulation of the BHoM
GNU Lesser General Public License v3.0
26 stars 15 forks source link

BHoM_Engine: RoundWithTolerance rounds to nearest instead of floor #3429

Closed pawelbaran closed 3 weeks ago

pawelbaran commented 3 weeks ago

Description:

Description of RoundWithTolerance method claims it rounds to floor (issue related to name ambiguity raised under https://github.com/BHoM/BHoM_Engine/issues/3426), and indeed it is what happens in most cases. However, line below rounds to nearest: https://github.com/BHoM/BHoM_Engine/blob/2bb21bbee1bcf8fcec1dfcda4dd1f7cf8258bcd7/BHoM_Engine/Query/RoundWithTolerance.cs#L73

...this of course causes different behaviour than intended.

FYI @alelom

Test file(s):

On SharePoint.