use Math::Vector::Real; $offset = V($x, $y, $z); $p_rotated_1deg = $axis->rotate_3d(1*$pi/180, $p - $offset) + $offset;