NAME
Physics::Balls::Ball - one ball's place in a layout
VERSION
Version 0.01
SYNOPSIS
my $ball = Physics::Balls::Ball->new(id => 3, x => 190500, y => 63500);
my ($x, $y) = $ball->metres;
my $row = $ball->row; # [3, 190500, 63500], what a layout holds
DESCRIPTION
A layout is a list of [id, x, y] rows in hundredths of a millimetre; this is the row as an object for a caller that wants one. The engine takes rows or these interchangeably.
METHODS
id
x
y
Integers, hundredths of a millimetre.
from_metres
my $ball = Physics::Balls::Ball->from_metres(3, 1.905, 0.635);
Rounds to the nearest hundredth.
metres
The position as two doubles.
row
The [id, x, y] row.