source: node_modules/d3-shape/src/symbol/asterisk.js@ e4c61dd

Last change on this file since e4c61dd was e4c61dd, checked in by istevanoska <ilinastevanoska@…>, 6 months ago

Prototype 1.1

  • Property mode set to 100644
File size: 377 bytes
Line 
1import {min, sqrt} from "../math.js";
2
3const sqrt3 = sqrt(3);
4
5export default {
6 draw(context, size) {
7 const r = sqrt(size + min(size / 28, 0.75)) * 0.59436;
8 const t = r / 2;
9 const u = t * sqrt3;
10 context.moveTo(0, r);
11 context.lineTo(0, -r);
12 context.moveTo(-u, -t);
13 context.lineTo(u, t);
14 context.moveTo(-u, t);
15 context.lineTo(u, -t);
16 }
17};
Note: See TracBrowser for help on using the repository browser.