This repository has been archived on 2023-03-25. You can view files and clone it, but cannot push or open issues or pull requests.
mightyscape-1.1-deprecated/extensions/fablabchemnitz/dxf_dwg_importer/node_modules/dxf/lib/util/rotate.js
2021-07-23 02:36:56 +02:00

21 lines
425 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
/**
* Rotate a points by the given angle.
*
* @param points the points
* @param angle the rotation angle
*/
var _default = function _default(p, angle) {
return {
x: p.x * Math.cos(angle) - p.y * Math.sin(angle),
y: p.y * Math.cos(angle) + p.x * Math.sin(angle)
};
};
exports["default"] = _default;