|
Last change
on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago |
|
Added visualizations
|
-
Property mode
set to
100644
|
|
File size:
474 bytes
|
| Line | |
|---|
| 1 | "use strict";
|
|---|
| 2 |
|
|---|
| 3 | Object.defineProperty(exports, "__esModule", {
|
|---|
| 4 | value: true
|
|---|
| 5 | });
|
|---|
| 6 | exports.default = void 0;
|
|---|
| 7 | var _math = require("../math.js");
|
|---|
| 8 | const tan30 = (0, _math.sqrt)(1 / 3);
|
|---|
| 9 | const tan30_2 = tan30 * 2;
|
|---|
| 10 | var _default = exports.default = {
|
|---|
| 11 | draw(context, size) {
|
|---|
| 12 | const y = (0, _math.sqrt)(size / tan30_2);
|
|---|
| 13 | const x = y * tan30;
|
|---|
| 14 | context.moveTo(0, -y);
|
|---|
| 15 | context.lineTo(x, 0);
|
|---|
| 16 | context.lineTo(0, y);
|
|---|
| 17 | context.lineTo(-x, 0);
|
|---|
| 18 | context.closePath();
|
|---|
| 19 | }
|
|---|
| 20 | }; |
|---|
Note:
See
TracBrowser
for help on using the repository browser.