Skip to content

Use NINT() instead of INT() in chkgrid.f origin checking#138

Open
roarkmd wants to merge 1 commit intoCEMPD:masterfrom
roarkmd:check_origin
Open

Use NINT() instead of INT() in chkgrid.f origin checking#138
roarkmd wants to merge 1 commit intoCEMPD:masterfrom
roarkmd:check_origin

Conversation

@roarkmd
Copy link

@roarkmd roarkmd commented Jan 16, 2026

Changed chkgrid.f check origin test to use NINT(), instead of INT(), to prevent failure for cases where CHK_X/CHK_Y is a float slightly below the value of the next rounded-up integer.

Consider this case that will currently fail:
X0 = 996000
Y0 = 256000
XORIG = 408000.
YORIG = -216000.
XCELL = 1333.33337
YCELL = 1333.33337

(Note, I am aware that the grid resolution is probably considered unusual.)

…to prevent failure for cases where CHK_X/CHK_Y is a float slighly below the value of the rounded-up integer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant