Commit Graph
6 Commits
Author SHA1 Message Date
underscorediscovery a86e8158e4 feat: add natural logarithm method to Num class with C binding and test
Implement the `log` method on Num by adding a DEF_NUM_FN(log, log) macro invocation in wren_core.c, registering the corresponding primitive `num_log` on the numClass, and creating a new test file test/core/number/log.wren that validates positive and negative input behavior.
2016-10-31 19:52:32 +00:00
underscorediscovery 8b9f99663b feat: add pow(_) primitive to Num class for exponentiation
Implement the `num_pow` primitive that wraps C's `pow()` function, enabling
exponentiation on Num instances via the `pow(_)` method. Register the new
primitive in `wrenInitializeCore` and add a test file verifying basic cases:
2^4=16, 2^10=1024, and 1^0=1.
2016-10-31 19:52:13 +00:00
underscorediscovery 84a14cde08 chore: add Sven Bergström to AUTHORS file for project contributions 2016-10-31 19:51:55 +00:00
underscorediscovery 0b1a3cc3e5 feat: add string indexOf with startIndex parameter and update wrenStringFind signature
Add a new primitive `string_indexOf_with_startIndex` that accepts a second integer argument to specify the starting position for the search. Modify the existing `wrenStringFind` function to accept a `startIndex` parameter, updating its Boyer-Moore-Horspool algorithm to begin scanning from the given offset. Update the `string_contains` primitive to pass `0` as the start index. Register the new overloaded method as `indexOf(_,_)` on the string class and add test cases covering boundary conditions and out-of-range start indices.
2016-07-14 03:53:01 +00:00
Sven Bergström aa6f105a53 fix: correct broken link to ranges introduction in Range class docs
The previous link pointed to a non-existent ../range.html page. The corrected link now points to the proper anchor #ranges within the values documentation page, ensuring readers can access the friendly introduction as intended.
2016-05-21 02:54:41 +00:00
Sven Bergström 995fc241e6 docs: fix iterator protocol link to use relative path from core/ module docs 2016-05-21 02:51:47 +00:00