# Feature: Image Rotation Core

## Description
Pure image rotation operations without state. Provides utility functions to rotate single images and batches of images by specified angles around their center. This is the foundation for rotation sweeps and pre-rotation before matching.

## Component APIs Implemented
- `rotate_image_360(image: np.ndarray, angle: float) -> np.ndarray`
- `rotate_chunk_360(chunk_images: List[np.ndarray], angle: float) -> List[np.ndarray]`

## External Tools and Services
- **opencv-python**: `cv2.warpAffine` for rotation transformation
- **numpy**: Matrix operations for rotation matrix construction

## Internal Methods
- `_build_rotation_matrix(center: Tuple[float, float], angle: float) -> np.ndarray`: Constructs 2x3 affine rotation matrix
- `_get_image_center(image: np.ndarray) -> Tuple[float, float]`: Calculates image center coordinates

## Unit Tests

### rotate_image_360
1. **Rotate 0°**: Input image equals output image (identity)
2. **Rotate 90°**: Image rotated 90° clockwise, dimensions preserved
3. **Rotate 180°**: Image inverted correctly
4. **Rotate 270°**: Image rotated 270° clockwise
5. **Rotate 45°**: Diagonal rotation with black fill at corners
6. **Rotate 360°**: Equivalent to 0° rotation
7. **Negative angle**: -90° equivalent to 270°
8. **Large angle normalization**: 450° equivalent to 90°

### rotate_chunk_360
1. **Empty chunk**: Returns empty list
2. **Single image chunk**: Equivalent to rotate_image_360
3. **Multiple images**: All images rotated by same angle
4. **Image independence**: Original chunk images unchanged
5. **Consistent dimensions**: All output images have same dimensions as input

## Integration Tests
None - this feature is stateless and has no external dependencies beyond opencv/numpy.

