Skip to content

Instantly share code, notes, and snippets.

@PJZ9n
Created April 22, 2020 01:02
Show Gist options
  • Save PJZ9n/4ee4b31a0aeb3c9d6002ddbccbc29569 to your computer and use it in GitHub Desktop.
Save PJZ9n/4ee4b31a0aeb3c9d6002ddbccbc29569 to your computer and use it in GitHub Desktop.
二つの座標から中心の座標を求める
<?php
$ax = 0;
$ay = 0;
$bx = 500;
$by = 660;
$x = ($ax + $bx) / 2;
$y = ($ay + $by) / 2;
echo $x, " ,", $y;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment