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

9
LINES

< > BotCompany Repo | #1033743 // toDoublePt

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

Libraryless. Click here for Pure Java version (4900L/27K).

static DoublePt toDoublePt(Pt p) {
  ret p == null ?: DoublePt(p.x, p.y);
}

static DoublePt toDoublePt(IDoublePt p) {
  if (p == null) null;
  if (p cast DoublePt) ret p;
  ret DoublePt(p.x_double(), p.y_double());
}

Author comment

Began life as a copy of #1033742

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1033743
Snippet name: toDoublePt
Eternal ID of this version: #1033743/2
Text MD5: 8c966dbaacdda4b66bb0a28a101dd646
Transpilation MD5: 629b9f9c3b6350ea6b15e7e58bde6dc5
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-01-22 18:39:09
Source code size: 225 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 197 / 266
Version history: 1 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)