UNPKG

vislite

Version:

灵活、快速、简单的数据可视化交互式跨端前端库

14 lines (12 loc) 339 B
/*! * rotate of VISLite JavaScript Library v1.3.0 * git+https://github.com/oi-contrib/VISLite.git */ function rotate (cx, cy, deg, x, y) { var cos = Math.cos(deg), sin = Math.sin(deg); return [ (x - cx) * cos - (y - cy) * sin + cx, (x - cx) * sin + (y - cy) * cos + cy ]; } export { rotate as default };