Commit Graph

4 Commits

Author SHA1 Message Date
Thorbjørn Lindeijer
c717b8d3fd feat: add Num.atan(x) method mapping to C atan2 for quadrant-aware arc tangent
Adds a new `atan(_)` primitive method to the Num class that wraps the C
`atan2` function, allowing callers to compute the arc tangent of the
number divided by a given argument `x` while using the signs of both
numbers to determine the correct quadrant of the result. The
implementation registers the primitive `num_atan2` in the core VM
initialization and documents the new method in the core library
reference.
2015-03-15 15:43:02 +00:00
Thorbjørn Lindeijer
ac414a24fd feat: add acos, asin, atan trigonometric methods to Num class
Implement arc cosine, arc sine, and arc tangent primitives in the VM core
and document them in the Num API reference.
2015-03-14 13:52:16 +00:00
Thorbjørn Lindeijer
2e6cb23b56 feat: add Num.tan method to core library and documentation
Add the missing `tan` method to the Num class, implementing the tangent
trigonometric function. This fills the gap between the existing `sin` and
`cos` methods, providing a complete set of basic trigonometric operations.

- Register `num_tan` primitive in the VM core initialization
- Implement `DEF_PRIMITIVE(num_tan)` using C's `tan()` math function
- Add documentation entry for `tan` in the core library reference
2015-03-14 13:40:23 +00:00
Bob Nystrom
18cf57d5f5 refactor: split source tree into vm/ and cli/ directories with updated build system
Separate Wren VM library sources from CLI tool sources by moving them into
src/vm/ and src/cli/ subdirectories respectively. Update the Makefile to use
separate wildcard patterns for each directory, generate distinct object file
paths under build/vm/ and build/cli/, and adjust include paths to src/include.
Also update the Xcode project file to reference the new file locations.
2015-03-14 22:00:50 +00:00