Skip to content

dustmop/arctan24

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

arctan24

This is the implementation of the discrete arctangent used in Star Versus. It takes as input an X-delta, Y-delta, and quadrant number and returns a direction between 0 and 23. Documentation on parameter passing accompanies the function, of note, no registers are preserved. Assembly source uses ca65 syntax.

testing

Using nes_unit_testing, the lisp based unit test verifies a couple of inputs to the arctan function. Run the tests using:

./run_tests.sh

Assumes SBCL.

more information

For more information on the motivation, design, and usage of this function, see this blog post.

About

Discrete arctan function, with 24 possible outputs, in 6502 assembly.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published