Sha256: efe5c25316eecf0e4f90a19d7a7ac3ee2af7a8cf0a49e9121d3b3bc810d13a4b

Contents?: true

Size: 373 Bytes

Versions: 1

Compression:

Stored size: 373 Bytes

Contents

#! /usr/bin/env ruby
# coding: utf-8

require "mageo/vector3d.rb"

#
# 球を表現するクラス。
#
class Cylinder
	attr_reader :positions, :radius

	# 座標と半径
	# positions は 両底面の中心座標を入れた配列。
	def initialize(position, radius)
		@positions = [
			Vector3D[*position[0]],
			Vector3D[*position[1]]
		]
		@radius = radius
	end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mageo-0.0.0 lib/mageo/cylinder.rb