| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| function fromNumber pNum | ||
| local tNum | ||
| put ((pNum - 1) mod 26) + 65 into tNum | ||
| put (pNum mod 27) + 64 into tNum |
There was a problem hiding this comment.
This does not wrap around correctly. For example shifting U by 6 will cause fromNumber(27) to be called, which gives 64, (@ in ascii).
Sorry, something went wrong.
|
From the test log: not ok - abjurer <-> nowhere (13) # abjurer <-> nowhere (13) failed # Expected result: nowhere # Actual result: NOWGDRD not ok - fusion <-> layout (6) # fusion <-> layout (6) failed # Expected result: layout # Actual result: L@YOUT not ok - manful <-> thumbs (7) # manful <-> thumbs (7) failed # Expected result: thumbs # Actual result: THUMAS Notice the letters that are shifted past Z and wrap around are all out by one. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Use a simpler method for computing the uppercase letter corresponding to a given number between 1 and 26