Skip to content

feat: дробные координаты точки - #10

Open
mokevnin wants to merge 1 commit into
mainfrom
feat/float-coordinates
Open

mokevnin wants to merge 1 commit into
mainfrom
feat/float-coordinates

Conversation

@mokevnin

@mokevnin mokevnin commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

makePoint() принимала только int. Задание php_compound_data_modeling строит точку (-1.5, 0), и на PHP 8.5 вызов печатал Deprecated: Implicit conversion from float to int loses precision, а координата теряла дробную часть. Копии библиотеки на JS, Python и Ruby дробные координаты принимают.

Типы makePoint(), getX() и getY() стали int|float, getX() получил тип параметра array. Тест проверяет точку с дробной координатой.

Проверено в образе hexlet-php (PHP 8.5, PHPUnit 13): тесты зелёные, phpcs PSR12 чистый.

Практики берут библиотеку с dev-main: ru и es php_compound_data_modeling, points, abstractions.

🤖 Generated with Claude Code

makePoint принимала только int, и задание php_compound_data_modeling с точкой
(-1.5, 0) на PHP 8.5 печатало Deprecated: Implicit conversion from float to
int loses precision, а координата теряла дробную часть. Копии библиотеки на
JS, Python и Ruby дробные координаты принимают.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant