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

    Function isPositionInBounds

    • Check if a position is within arena boundaries.

      Only checks X and Z axes (horizontal plane). Y axis (height) is ignored.

      For 2D positions, accepts { x, y } where y maps to world Z (depth), consistent with clampToArenaBounds and other 2D arena position APIs.

      Korean: 경기장 경계 내 위치 확인 (Check Position In Bounds)

      Parameters

      • position: Vector3 | Position3D | { x: number; y: number }

        Position to check (2D {x,y} where y=depth, or 3D Vector3/Position3D)

      • bounds: MovementArenaBounds

        Arena bounds

      Returns boolean

      True if position is within bounds

      // 2D position (y maps to Z/depth)
      const position = { x: 5, y: 2 };
      const bounds = calculateArenaBounds(config);
      const inBounds = isPositionInBounds(position, bounds);

      // 3D position (uses z directly)
      const position3D = new THREE.Vector3(5, 1.8, 2);
      const inBounds3D = isPositionInBounds(position3D, bounds);