Fork me on GitHub

editor/mathpath

Methods

pathCommonAncestor(p: Array.<string>, q: Array.<string>) → Array.<string>privatestatic

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

p Array.<string>
q Array.<string>
Array.<string>   
Source

pathDistance(p: Array.<string>, q: Array.<string>) → numberprivatestatic

p Array.<string>
q Array.<string>
number   

0 if the paths are identical

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

Source

pathFromString(string: string) → Objectprivatestatic

string string
Object   
Source

pathToString(path: Object, extent: number) → stringprivatestatic

path Object
extent number
string   
Source