fork download
  1. point rotate(point origional, point around, radian add_angle) {
  2. point offset = {origional.x-around.x, origional.y-around.y};
  3. double length = distance(origional, around);
  4. radian angle = atan2(offset.y, offset.x);
  5. angle += add_angle;
  6. point result = {length*cos(angle), length*sin(angle)};
  7. result += around;
  8. return result;
  9. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:1: error: 'point' does not name a type
stdout
Standard output is empty