robertkrimen / otto

A JavaScript interpreter in Go (golang)
http://godoc.org/github.com/robertkrimen/otto
MIT License
8.01k stars 584 forks source link

feat:add math function #485

Closed noobHuKai closed 1 year ago

noobHuKai commented 1 year ago

add some math function

Asday commented 1 year ago

Am I being particularly blind or are none of these in the spec?

noobHuKai commented 1 year ago

Don't from Edition 5.1, but from Edition 6.0 These math function are common

Asday commented 1 year ago

Common as you want:

  • Otto targets ES5. ES6 features (eg: Typed Arrays) are not supported.

-- https://github.com/robertkrimen/otto#caveat-emptor

stevenh commented 1 year ago

Lets try an move that forward :)

stevenh commented 1 year ago

@noobHuKai as you can see from failure inline.go is auto generated by tools/gen-jscore so you will need update to its configuration to ensure that's compatible.

stevenh commented 1 year ago

FYI I just merged a change which added a notification header to generated files, so it's harder for people to make this mistake in the future.

noobHuKai commented 1 year ago

I'm sorry,I'm not familiar with configuration,Thank you for the tip ! ! !

stevenh commented 1 year ago

I'm sorry, I'm not familiar with configuration, Thank you for the tip ! ! !

It's new so no need to be sorry :)