source: node_modules/victory-vendor/lib-vendor/d3-shape/src/symbol/triangle.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: 418 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 y = -(0, _math.sqrt)(size / (sqrt3 * 3));
12 context.moveTo(0, y * 2);
13 context.lineTo(-sqrt3 * y, -y);
14 context.lineTo(sqrt3 * y, -y);
15 context.closePath();
16 }
17};
Note: See TracBrowser for help on using the repository browser.