Skip to content
Snippets Groups Projects
Commit 3c345cc6 authored by Alexander Rose's avatar Alexander Rose
Browse files

Merge branch 'master' into graphics

parents 3532b0d7 db0abcac
No related branches found
No related tags found
No related merge requests found
/**
* Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info.
* Copyright (c) 2018-2019 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* @author David Sehnal <david.sehnal@gmail.com>
* @author Alexander Rose <alexander.rose@weirdbyte.de>
*/
import { SpacegroupCell, Box3D } from 'mol-math/geometry'
import { Tensor, Mat4, Vec3 } from 'mol-math/linear-algebra'
import { equalEps } from 'mol-math/linear-algebra/3d/common';
/** The basic unit cell that contains the data. */
interface VolumeData {
......@@ -48,7 +50,7 @@ namespace VolumeIsoValue {
export type Absolute = Readonly<{ kind: 'absolute', absoluteValue: number }>
export function areSame(a: VolumeIsoValue, b: VolumeIsoValue, stats: VolumeData['dataStats']) {
return toAbsolute(a, stats).absoluteValue === toAbsolute(b, stats).absoluteValue
return equalEps(toAbsolute(a, stats).absoluteValue, toAbsolute(b, stats).absoluteValue, stats.sigma / 100)
}
export function absolute(value: number): Absolute { return { kind: 'absolute', absoluteValue: value }; }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment