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

@devexpress/utils

Package Overview
Dependencies
Maintainers
37
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@devexpress/utils - npm Package Compare versions

Comparing version 1.0.0-alpha-012 to 1.0.0

lib/geometry/line-equation.d.ts

8

lib/geometry/segment.d.ts

@@ -18,10 +18,2 @@ import { IPoint, IRectangle } from './interfaces';

}
export declare class LineEquation extends Segment {
private A;
private B;
private C;
constructor(startPoint: Point, endPoint: Point);
static intersection(a: LineEquation, b: LineEquation): Point | null;
private initEquationParams;
}
//# sourceMappingURL=segment.d.ts.map

35

lib/geometry/segment.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LineEquation = exports.Segment = void 0;
var tslib_1 = require("tslib");
exports.Segment = void 0;
var math_1 = require("../utils/math");

@@ -98,33 +97,1 @@ var point_1 = require("./point");

exports.Segment = Segment;
var LineEquation = (function (_super) {
tslib_1.__extends(LineEquation, _super);
function LineEquation(startPoint, endPoint) {
var _this = _super.call(this, startPoint, endPoint) || this;
_this.initEquationParams();
return _this;
}
LineEquation.intersection = function (a, b) {
var A1 = a.A;
var B1 = a.B;
var C1 = a.C;
var A2 = b.A;
var B2 = b.B;
var C2 = b.C;
var v = A2 * B1 - A1 * B2;
if (math_1.MathUtils.numberCloseTo(v, 0))
return null;
if (A1 === 0) {
var x = (B2 * C1 - C2 * B1) / (B1 * A2);
return new point_1.Point(x, -C1 / B1);
}
var y = (C2 * A1 - C1 * A2) / v;
return new point_1.Point((-B1 * y - C1) / A1, y);
};
LineEquation.prototype.initEquationParams = function () {
this.A = this.endPoint.y - this.startPoint.y;
this.B = this.startPoint.x - this.endPoint.x;
this.C = this.endPoint.x * this.startPoint.y - this.startPoint.x * this.endPoint.y;
};
return LineEquation;
}(Segment));
exports.LineEquation = LineEquation;
{
"name": "@devexpress/utils",
"version": "1.0.0-alpha-012",
"version": "1.0.0",
"description": "DevExpress utils",

@@ -5,0 +5,0 @@ "author": "DevExpress Inc.",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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