Fork me on GitHub

editor/mathpath

Methods

pathCommonAncestor(p: string[], q: string[]): string[]privatestatic

Given two paths, return a path representing their common ancestor.

p : string[]
q : string[]
: string[]   

pathDistance(p: string[], q: string[]): numberprivatestatic

p : string[]
q : string[]
: number   

0 if the paths are identical

  • 1 if they are siblings
  • 1 if they are not siblings

pathFromString(string: string): objectprivatestatic

string : string
: object   

pathToString(path: object, extent: number): stringprivatestatic

path : object
extent : number
: string