molstar
Version:
A comprehensive macromolecular library.
20 lines • 722 B
JavaScript
/**
* 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 { Vec3 } from '../linear-algebra';
import { Box3D } from '../geometry';
export function getRegularGrid3dDelta(_a) {
var box = _a.box, dimensions = _a.dimensions;
return Vec3.div(Vec3(), Box3D.size(Vec3(), box), Vec3.subScalar(Vec3(), dimensions, 1));
}
export function fillGridDim(length, start, step) {
var a = new Float32Array(length);
for (var i = 0; i < a.length; i++) {
a[i] = start + (step * i);
}
return a;
}
//# sourceMappingURL=common.js.map