# Star.lib - utilities for any scratch project Star.lib provides various implements to facilitate the creation of projects. No attribution is required (though it would be appreciated) to use these functions in your project, and the scripts are made to be backpackable.
## Current starlib functions: • sign - Get the sign of a number • clamp - Ensure a number is in a certain range • substring - Get a smaller part of a longer string ### Note: All custom blocks in Star.lib run without screen refresh by default. ## Contributing Feel free to make a remix of Star.lib and contribute your changes and add useful functions. If you do, follow this checklist: • Name your remix informatively - Change the name of your remix to include a summary of things you have added. Keep it short and sweet, and if needed, replace instructions/notes with the changes made as well. • Added functions should be universally applicable - Even though a custom block to draw some text using the pen might be useful, it doesn't belong in Star.lib. • Custom block's names should be in the following format: ### Format • Block name: `✱ <name> [<argument name>: <argument type> (<argument type> <argument name>)] → $<name>.out` • All variables for a block should be set to `this sprite only` • The `$<name>.out` variable can have smaller parts if a function returns multiple things: `$<name>.out.x` • Any variables used in blocks that aren't output should be named `$<name>._.<variable name>` #### Example `✱ clamp t: int (int t) min: int (int min) max: int (int max) → $clamp.out`