(****************************************************************************** ** PointFromVec.sml ** sml ** ** Franklin Chen and Guy Blelloch ** Generates a POINT given a VEC ******************************************************************************) functor PointFromVec(structure Vec : VEC) : POINT = struct structure Vec = Vec structure Number = Vec.Number type point = Vec.t type t = point val origin = Vec.zero val == = Vec.== val != = Vec.!= val toString = Vec.toString val fromSeq = Vec.fromSeq val toSeq = Vec.toSeq (* Same representation. *) fun toVec p = p fun fromVec v = v val translate = Vec.+ fun a - b = Vec.-(a,b) end