Skip to content

Instantly share code, notes, and snippets.

x y
111.2472 134.44173
118.9517 142.12362000000002
94.74716 109.75992
88.61079 97.8963
82.47441 86.0327
68.92898 69.3962
74.42898 63.25980000000001
79.92898 57.12350000000001
110.929 60.35079999999999
x y
56.87535 128.30394
101.4467 137.21819
113.3324 136.76102
125.1039 132.53244
128.1896 125.56102
131.2754 118.58961
127.0467 102.01819
119.961 95.3896
112.8754 88.761
x y
63.39118 117.88457
71.09575 125.56646
78.80032 133.24827
88.48212 135.61189000000002
98.16394 137.97550999999999
115.7549 138.43
121.4821 132.06637999999998
127.2094 125.70276
128.5276 109.15724
x y
20 25
30 25
20 5
30 5
x y
20 20
25 25
30 20
20 5
30 5
{
"total" : 0,
"lastUpdated" : "Thu, 07 Nov 2019 22:55:15 GMT"
}
@masautt
masautt / 5qpt0yu.js
Created November 7, 2019 22:37
FullStackFaqs - Code Answers
function roundUp(num, prec) {
prec = Math.pow(10, prec);
return Math.ceil(num * prec) / prec;
}
function roundDown(num, prec) {
prec = Math.pow(10, prec);
return Math.floor(num * prec) / prec;
}
// Built in Math function
@masautt
masautt / settings.json
Last active November 7, 2019 21:58
VSCode Settings
{
"editor.accessibilitySupport": "off",
"editor.mouseWheelZoom": true,
"workbench.iconTheme": "material-icon-theme",
"editor.detectIndentation": false,
"explorer.confirmDelete": false,
"editor.wordWrap": "on",
"editor.minimap.enabled": false,
"terminal.integrated.rendererType": "dom",
"workbench.colorTheme": "One Dark Pro Vivid",
@masautt
masautt / anc4mfc.js
Created September 16, 2019 05:22
How to remove whitespace from a string in JavaScript?
// Remove all whitespace
function delWS1(str) {
return str.replace(/\s/g,"");
}
// Remove trailing and leading whitepsace
function delWS2(str) {
return str.replace(/^[ ]+|[ ]+$/g,'');
}
@masautt
masautt / 5qpt0yu.js
Created September 16, 2019 04:52
How do you round numbers in JavaScript?
function roundUp(num, prec) {
prec = Math.pow(10, prec);
return Math.ceil(num * prec) / prec;
}
function roundDown(num, prec) {
prec = Math.pow(10, prec);
return Math.floor(num * prec) / prec;
}
// Built in Math function