Class Example_ocamldoc.vector


class vector : int -> int -> object .. end
Class of two-dimensional integral vectors.

This is a class used to represent two-dimensional integral vectors.

x_p : The value to give to the first component of the vector.
y_p : The value to give to the second component of the vector.
Inherits
method x : int
Get the first component of the vector.
Returns The first component of the vector.
method y : int
Get the second component of the vector.
Returns The second component of the vector.
method scale : float -> unit
Scale the vector by a scalar.
Raises Invalid_scalar When s is an invalid scalar.
s : The scalar by which to scale the vector.
method string_representation : string
Get a string representation of the vector.
Returns A string representation of the vector.