Libraryless. Click here for Pure Java version (4638L/26K).
static L<DoublePt> lambdaMapLike graphAsPolygon(IF1<Double> formula, int w, int h) { new L<DoublePt> points; points.add(DoublePt(0, 0)); for x to w: { double y = formula.get(doubleRatio(x, w))*h; points.add(DoublePt(x, y)); } points.add(DoublePt(w-1, 0)); ret points; }
Began life as a copy of #1016056
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1033485 |
Snippet name: | graphAsPolygon |
Eternal ID of this version: | #1033485/3 |
Text MD5: | 3cdffdfb733a640f16ed9812215ee78e |
Transpilation MD5: | bd5f2ed3bb0f2fb156b112bc9e3cae09 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-10-29 03:24:03 |
Source code size: | 298 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 158 / 230 |
Version history: | 2 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |