You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@leafer/math

Package Overview
Dependencies
Maintainers
1
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leafer/math - npm Package Compare versions

Comparing version
1.0.0-rc.21
to
1.0.0-rc.22
+2
-2
package.json
{
"name": "@leafer/math",
"version": "1.0.0-rc.21",
"version": "1.0.0-rc.22",
"description": "@leafer/math",

@@ -25,4 +25,4 @@ "author": "Chao (Leafer) Wan",

"devDependencies": {
"@leafer/interface": "1.0.0-rc.21"
"@leafer/interface": "1.0.0-rc.22"
}
}

@@ -25,3 +25,3 @@ import { IAround, IPointData, IBoundsData } from '@leafer/interface'

toPoint(around: IAround, bounds: IBoundsData, to?: IPointData, onlySize?: boolean) {
toPoint(around: IAround, bounds: IBoundsData, to?: IPointData, onlySize?: boolean, pointBounds?: IBoundsData) {
to || (to = {} as IPointData)

@@ -33,2 +33,9 @@

if (pointBounds) {
to.x -= pointBounds.x
to.y -= pointBounds.y
if (point.x) to.x -= (point.x === 1) ? pointBounds.width : (point.x === 0.5 ? point.x * pointBounds.width : 0)
if (point.y) to.y -= (point.y === 1) ? pointBounds.height : (point.y === 0.5 ? point.y * pointBounds.height : 0)
}
if (!onlySize) {

@@ -35,0 +42,0 @@ to.x += bounds.x

@@ -171,3 +171,3 @@ import { INumberMap, IPoint, IPointData, IMatrixData, IBounds, IBoundsData, IMatrix, IFourNumber, IObject, IBoundsDataFn, IRadiusPointData, IMatrixWithLayoutData, IAutoBounds, IAutoBoundsData, ISizeData, IMatrixWithScaleData, ILayoutData, IAround, IOffsetBoundsData, ITwoPointBoundsData, IMatrixWithOptionScaleData, IScaleData } from '@leafer/interface';

get: typeof get;
toPoint(around: IAround, bounds: IBoundsData, to?: IPointData, onlySize?: boolean): void;
toPoint(around: IAround, bounds: IBoundsData, to?: IPointData, onlySize?: boolean, pointBounds?: IBoundsData): void;
};

@@ -174,0 +174,0 @@ declare function get(around: IAround): IPointData;