logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

near - Determine whether two values are roughly equal.

Author

       Chris Radek

Functions

near.N (requires a floating-point thread)

License

       GPL

LinuxCNC Documentation                             2025-06-19                                            NEAR(9)

Name

       near - Determine whether two values are roughly equal.

Parameters

near.N.scale float rw (default: 1)
       near.N.difference float rw (default: 0)

Pins

near.N.in1 float in
       near.N.in2 float in
       near.N.out bit out

              out  is true if in1 and in2 are within a factor of scale (i.e., for in1 positive, in1/scale <= in2
              <= in1*scale), OR if their absolute difference is no greater than difference (i.e.,  |in1-in2|  <=
              difference).  out is false otherwise.

Synopsis

loadrtnear[count=N|names=name1[,name2...]]

See Also