23 lines
478 B
TypeScript
23 lines
478 B
TypeScript
module A {
|
|
|
|
class Point {
|
|
x: number;
|
|
y: number;
|
|
}
|
|
|
|
export var Origin: Point = { x: 0, y: 0 };
|
|
|
|
export class Point3d extends Point {
|
|
z: number;
|
|
}
|
|
|
|
export var Origin3d: Point3d = { x: 0, y: 0, z: 0 };
|
|
|
|
export class Line<TPoint extends Point>{
|
|
constructor(public start: TPoint, public end: TPoint) { }
|
|
|
|
static fromorigin2d(p: Point): Line<Point>{
|
|
return null;
|
|
}
|
|
}
|
|
}
|