cortex-js / compute-engine

An engine for symbolic manipulation and numeric evaluation of math formulas expressed with MathJSON
https://cortexjs.io
MIT License
356 stars 42 forks source link

Support geo operations #172

Open kingfisherphuoc opened 2 months ago

kingfisherphuoc commented 2 months ago

Description

Currently, I am working on a tool that needs to manipulate geo info (degree, minute, second). I could not find any operation such as Add, Subtract...etc for geo info.

Steps to Reproduce

(Required) Provide steps that are specific and repeatable

  1. using CE to parse this expression: 9^\circ 0^\prime 0^\doubleprime + 1^\circ 0^\prime 0^\doubleprime
  2. try to evaluate the value.

Actual Behavior

(Required) What happened when you followed the steps above?

I got an exception when I tried to evaluate the expression.

Expected Behavior

(Required) What did you expect to happen instead? It may be obvious to you what should have happened, but if you don't state it explicitly it may not be obvious to others.

It should return a correct result of geo information after the add operation.

Environment

Is this a regression: did it use to work in a previous version?

MathLive version 0.9.6

Operating System _macOS, Android

Browser Chrome