{"size": 341, "ext": "js", "max_stars_repo_path": "test/units/CosineDistance.js", "max_stars_repo_name": "SeregPie/VectorMath", "max_stars_repo_stars_event_min_datetime": "2020-02-10T12:11:48.000Z", "max_stars_repo_stars_event_max_datetime": "2021-04-11T13:19:46.000Z", "max_issues_repo_path": "test/units/CosineDistance.js", "max_issues_repo_name": "SeregPie/VectorMath", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "test/units/CosineDistance.js", "max_forks_repo_name": "SeregPie/VectorMath", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 2, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 34.1, "max_line_length": 97, "alphanum_fraction": 0.6246334311}
let {assert} = require('chai');

let VectorMath = require('../../');

module.exports = function() {
	assert.equal(VectorMath.CosineDistance([], []), 1);
	assert.equal(VectorMath.CosineDistance([-86, -53, 60, -41], [-86, -53, 60, -41]), 0);
	assert.almostEqual(VectorMath.CosineDistance([58, -1, -99, -14], [69, 2, -35, 75]), 0.48506629);
};
