Rotate Node around another Node, no anchor point change


I am using Cocos Creator 3.8.2. I am creating a tile-based level editor in which creators may rotate tiles around a point on a grid.

For any node N on the grid (x, y), how might I rotate the node around any point (a, b)? I cannot change the anchor point of N. I want some math, probably some trig involved, to solve this.

    public setAngleAround(node: Node, center: Vec3, angle: number){
        let radian = angle * Math.PI / 180;
        let nodePos = node.getPosition();
        let d = Vec3.distance(nodePos, center);
        nodePos.x = center.x + Math.cos(radian) * d;
        nodePos.y = center.y + Math.sin(radian) * d;