UNPKG

simscript

Version:

A Discrete Event Simulation Library in TypeScript

24 lines (23 loc) 1.07 kB
export declare function assert(condition: boolean, msg: string | Function): void; export declare function format(value: number, decimals?: number): string; export declare function bind(id: string, initialValue: any, onInput: Function, suffix?: string, decimals?: number): void; export declare function setOptions(obj: any, options: any): void; export declare function getElement(selector: any): Element; export declare function clamp(value: number, min: number | null, max: number | null): number; export declare function isNumber(val: any): boolean; export interface IPoint { x: number; y: number; z?: number; } export declare class Point implements IPoint { x: number; y: number; z: number; constructor(x?: number, y?: number, z?: number); static clone(p: IPoint): IPoint; static copy(dst: IPoint, src: IPoint): IPoint; static distance(p1: IPoint, p2: IPoint): number; static interpolate(p1: IPoint, p2: IPoint, t: number): IPoint; static angle(p1: IPoint, p2: IPoint, radians?: boolean): number; }