@mat3ra/prode 2026.2.25-0 → 2026.3.14-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,7 +27,7 @@ export declare class BandStructureConfig extends HighChartsConfig {
27
27
  });
28
28
  cleanXDataArray(rawData?: XDataArray): XDataArrayNested;
29
29
  calculatePointsDistance(listOfPoints?: XDataArrayNested): number[];
30
- findSymmetryPointIndex(xDataArray: XDataArrayNested, point: number[]): number;
30
+ findSymmetryPointIndex(xDataArray: XDataArrayNested, point: number[], tolerance?: number): number;
31
31
  plotXLines(): PlotLines[];
32
32
  plotXLineAtPoint({ point, distance }: {
33
33
  point: string;
@@ -53,8 +53,8 @@ class BandStructureConfig extends highcharts_1.HighChartsConfig {
53
53
  });
54
54
  }
55
55
  // find index of a point inside an array of points
56
- findSymmetryPointIndex(xDataArray, point) {
57
- return xDataArray.findIndex((p) => math_1.math.vDist(p, point) === 0);
56
+ findSymmetryPointIndex(xDataArray, point, tolerance = 10 ** -exports._POINT_COORDINATES_PRECISION_) {
57
+ return xDataArray.findIndex((p) => math_1.math.vEqualWithTolerance(p, point, tolerance));
58
58
  }
59
59
  // create config for vertical lines at high symmetry points
60
60
  plotXLines() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mat3ra/prode",
3
- "version": "2026.2.25-0",
3
+ "version": "2026.3.14-0",
4
4
  "description": "PROperty DEfinitions",
5
5
  "scripts": {
6
6
  "test": "nyc --reporter=text mocha --recursive --bail",
@@ -92,8 +92,12 @@ export class BandStructureConfig extends HighChartsConfig {
92
92
  }
93
93
 
94
94
  // find index of a point inside an array of points
95
- findSymmetryPointIndex(xDataArray: XDataArrayNested, point: number[]) {
96
- return xDataArray.findIndex((p) => codeJSMath.vDist(p, point) === 0);
95
+ findSymmetryPointIndex(
96
+ xDataArray: XDataArrayNested,
97
+ point: number[],
98
+ tolerance = 10 ** -_POINT_COORDINATES_PRECISION_,
99
+ ): number {
100
+ return xDataArray.findIndex((p) => codeJSMath.vEqualWithTolerance(p, point, tolerance));
97
101
  }
98
102
 
99
103
  // create config for vertical lines at high symmetry points