Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

8
LINES

< > BotCompany Repo | #1033292 // assertDoublesVeryClose_warnOnly

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (3905L/22K).

svoid assertDoublesVeryClose_warnOnly(S msg default "", double x, double y, double threshold) {
  assertDoublesVeryClose_warnOnly(-> msg, x, y, threshold);
}

svoid assertDoublesVeryClose_warnOnly(IF0<S> msg, double x, double y, double threshold) {
  if (abs(x-y) > threshold)
    warn(renderVars(callF(msg), +x, +y));
}

Author comment

Began life as a copy of #1033288

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1033292
Snippet name: assertDoublesVeryClose_warnOnly
Eternal ID of this version: #1033292/3
Text MD5: 8bd32a81668573e77b4a008d3fab33b5
Transpilation MD5: 0254e40926b04205b11b1543e29be5ac
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-18 11:42:43
Source code size: 329 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 233 / 341
Version history: 2 change(s)
Referenced in: [show references]