Black Trigram (흑괘) - Korean Martial Arts Combat Simulator API - v0.7.0
    Preparing search index...

    Function calculateAngleToTarget

    • Calculates angle from one position to another Returns angle in degrees (0-360)

      • 0° = pointing right (+X)
      • 90° = pointing down (+Z)
      • 180° = pointing left (-X)
      • 270° = pointing up (-Z)

      Parameters

      Returns number

      Angle in degrees

      calculateAngleToTarget({ x: 0, y: 0 }, { x: 1, y: 0 }); // Returns 0° (right)
      calculateAngleToTarget({ x: 0, y: 0 }, { x: 0, y: 1 }); // Returns 90° (down)

      목표각도계산