Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lunit/is-polygon-area-greater-than-area

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lunit/is-polygon-area-greater-than-area - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

15

index.js

@@ -94,13 +94,12 @@ (function(e, a) { for(var i in a) e[i] = a[i]; }(exports, /******/ (function(modules) { // webpackBootstrap

/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPolygonAreaGreaterThanArea", function() { return isPolygonAreaGreaterThanArea; });
function isPolygonAreaGreaterThanArea(polygon) {
var isGreaterThanArea = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;
function isPolygonAreaGreaterThanArea(polygon, isGreaterThanArea = 100) {
// https://stackoverflow.com/questions/16285134/calculating-polygon-area
// polygon의 면적을 계산해서 최소 면적 이상인 경우를 검증한다
var total = 0;
let total = 0;
for (var i = 0, l = polygon.length; i < l; i++) {
var addX = polygon[i][0];
var addY = polygon[i === polygon.length - 1 ? 0 : i + 1][1];
var subX = polygon[i === polygon.length - 1 ? 0 : i + 1][0];
var subY = polygon[i][1];
for (let i = 0, l = polygon.length; i < l; i++) {
const addX = polygon[i][0];
const addY = polygon[i === polygon.length - 1 ? 0 : i + 1][1];
const subX = polygon[i === polygon.length - 1 ? 0 : i + 1][0];
const subY = polygon[i][1];
total += addX * addY * 0.5;

@@ -107,0 +106,0 @@ total -= subX * subY * 0.5;

{
"name": "@lunit/is-polygon-area-greater-than-area",
"version": "1.0.1",
"version": "1.0.2",
"description": "Test is polygon area greater than area",

@@ -9,3 +9,3 @@ "author": {

},
"repository": "lunit-io/opt-tool-frontend",
"repository": "lunit-io/frontend-components",
"license": "MIT",

@@ -12,0 +12,0 @@ "publishConfig": {

@@ -29,3 +29,2 @@ # Install

import { isPolygonAreaGreaterThanArea } from '@lunit/is-polygon-area-greater-than-area';
import { withOptTheme } from '@lunit/opt-theme';
import { storiesOf } from '@storybook/react';

@@ -37,3 +36,3 @@ import React, { ReactNode, useCallback, useState } from 'react';

const resetTime: number = Date.now();
const image: CornerstoneImage = new CornerstoneSingleImage(`wadouri:samples/series/CT000010.dcm`, {unload: unloadWADOImage});
const image: CornerstoneImage = new CornerstoneSingleImage(`wadouri:https://lunit-io.github.io/frontend-fixtures/dcm-files/series/CT000010.dcm`, {unload: unloadWADOImage});

@@ -102,3 +101,2 @@ function doNothing() {

storiesOf('in-polygon-area-greater-than-area', module)
.addDecorator(withOptTheme)
.add('isPolygonAreaGreaterThanArea()', () => <Sample/>);

@@ -105,0 +103,0 @@ ```

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc