<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>IsThisAPen</author_name>
  <author_url>https://blog.hatena.ne.jp/IsThisAPen/</author_url>
  <blog_title>Notes_JP</blog_title>
  <blog_url>https://www.mynote-jp.com/</blog_url>
  <categories>
    <anon>プログラミング</anon>
    <anon>プログラミング-競技プログラミング</anon>
    <anon>プログラミング-Python</anon>
  </categories>
  <description>与えられた点の集合を，偏角（あるいは原点と各点を通る直線の傾き）によってソートすることを考えます．まず，傾き（y / x）や偏角（atan2）を計算した上でソートすることが考えられます．しかし，この方法では，誤差によって正しくソートできない可能性があります（例：E - 7 (ABC225E - フ - 競プロはじめました)）．こうした事情から，入力が全て整数の場合，整数だけを用いてソートする方法が欲しくなります．これは，比較関数をベクトルの「外積」で定義すれば実現できます． 比較関数 傾きで考える 外積で考える ソート Python 比較関数傾きで考える原点と点$\boldsymbol{r}_…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.mynote-jp.com%2Fentry%2FSort-points-by-angle&quot; title=&quot;偏角でソート - Notes_JP&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2021-11-06 20:31:37</published>
  <title>偏角でソート</title>
  <type>rich</type>
  <url>https://www.mynote-jp.com/entry/Sort-points-by-angle</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
