15 lines
No EOL
291 B
TypeScript
15 lines
No EOL
291 B
TypeScript
module A {
|
|
|
|
export class Point {
|
|
x: number;
|
|
y: number;
|
|
}
|
|
|
|
export class Line {
|
|
constructor(public start: Point, public end: Point) { }
|
|
}
|
|
|
|
export function fromOrigin(p: Point): Line {
|
|
return new Line({ x: 0, y: 0 }, p);
|
|
}
|
|
} |