{"image_url":null,"provider_url":"https://hatena.blog","blog_title":"\u30dc\u30af\u30ce\u30b9","width":"100%","blog_url":"https://boxnos.hatenablog.com/","url":"https://boxnos.hatenablog.com/entry/20070508/1178553459","description":"\u305d\u3046\u3044\u3048\u3070\u3001\u5f8c\u534a\u6226\u304c\u6b8b\u3063\u3066\u3044\u305f\u30022\u6b21\u5143\u30d9\u30af\u30c8\u30ebVector\u3092\u5b9a\u7fa9\u3057\u3066\u6f14\u7b97\u5b50\u306e\u5b9a\u7fa9\u3092\u5b66\u7fd2\u3059\u308b\u3002\u30b5\u30f3\u30d7\u30eb\u306b\u3001\u5185\u7a4dO\u3068\u5916\u7a4dX\u3092\u8ffd\u52a0\u3057\u3066\u307f\u305f\u3002 #!/usr/bin/ruby class Vector attr_reader :x, :y def initialize(x=0.0, y=0.0) @x, @y = x, y end def inspect \"(#{@x}, #{@y})\" end def +(v) Vector.new(@x + v.x, @y + v.y) end def -(v) Vector.new(@x - v.x, @y - v.y) end def +@ self.dup \u2026","published":"2007-05-08 00:57:39","version":"1.0","categories":["Ruby"],"title":" \u305f\u306e\u3057\u3044Ruby \u7b2c19\u7ae0\u5f8c\u534a \u6f14\u7b97\u5b50\u306e\u5b9a\u7fa9","height":"190","author_url":"https://blog.hatena.ne.jp/tanakaBox/","author_name":"tanakaBox","type":"rich","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fboxnos.hatenablog.com%2Fentry%2F20070508%2F1178553459\" title=\" \u305f\u306e\u3057\u3044Ruby \u7b2c19\u7ae0\u5f8c\u534a \u6f14\u7b97\u5b50\u306e\u5b9a\u7fa9 - \u30dc\u30af\u30ce\u30b9\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_name":"Hatena Blog"}