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

6
LINES

< > BotCompany Repo | #1033133 // assertPointInBounds

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

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

svoid assertPointInBounds(int x, int y, int w, int h) {
  if (x < 0) fail("x < 0", x);
  if (y < 0) fail("y < 0", y);
  if (x >= w) fail("x >= w", x, w);
  if (y >= h) fail("y >= h", y, h);
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1033133
Snippet name: assertPointInBounds
Eternal ID of this version: #1033133/1
Text MD5: 5375d6b4cda68a48a41ce511f950ba51
Transpilation MD5: f139cc0252cc5714ec24ca6b546c995b
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-15 16:56:27
Source code size: 196 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 73 / 114
Referenced in: [show references]