source: node_modules/victory-vendor/lib-vendor/d3-shape/src/symbol/triangle2.js

Last change on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 461 bytes
Line 
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.default = void 0;
7var _math = require("../math.js");
8const sqrt3 = (0, _math.sqrt)(3);
9var _default = exports.default = {
10 draw(context, size) {
11 const s = (0, _math.sqrt)(size) * 0.6824;
12 const t = s / 2;
13 const u = s * sqrt3 / 2; // cos(Math.PI / 6)
14 context.moveTo(0, -s);
15 context.lineTo(u, t);
16 context.lineTo(-u, t);
17 context.closePath();
18 }
19};
Note: See TracBrowser for help on using the repository browser.