Published Jan 19th, 2025, 1/19/25 4:52 am
- 1,530 views • 16 today
- 91 downloads • 0 today
14
Math in Minecraft is horrible! It's really hard to do anything more complicated than simple addition, subtraction, multiplication and division. This is why I made this datapack that 'calculates' sines, cosines, tangents, etc.
How to calculate sine, cosine or tangent:
Set the input value to your angle (in degrees).
/scoreboard players set input gon A
Run the function input_angle to do some calculations before the sine, cosine or tangent can be calculated
/function gon:input_angle
Run your desired operation!
/function gon:sin with storage gon:input
/function gon:cos with storage gon:input
/function gon:tan with storage gon:input
Your result (with all decimals) will be stored within the storage 'gon:output' in the nbt tag 'output'
/data get storage gon:output output
How to calculate the angle with the sine, cosine or tangent as input:
Set the input to your sine, cosine or tangent times 1000. This code needs 3 decimal places to correctly determine the angle with an accuracy of 1°
/scoreboard players set input gon A
Run your desired operation!
/function gon:arcsin
/function gon:arccos
/function gon:arctan
Your result will be stored within the storage 'gon:output' in the nbt tag 'output'
/data get storage gon:output output
How to calculate sine, cosine or tangent:
Set the input value to your angle (in degrees).
/scoreboard players set input gon A
Run the function input_angle to do some calculations before the sine, cosine or tangent can be calculated
/function gon:input_angle
Run your desired operation!
/function gon:sin with storage gon:input
/function gon:cos with storage gon:input
/function gon:tan with storage gon:input
Your result (with all decimals) will be stored within the storage 'gon:output' in the nbt tag 'output'
/data get storage gon:output output
How to calculate the angle with the sine, cosine or tangent as input:
Set the input to your sine, cosine or tangent times 1000. This code needs 3 decimal places to correctly determine the angle with an accuracy of 1°
/scoreboard players set input gon A
Run your desired operation!
/function gon:arcsin
/function gon:arccos
/function gon:arctan
Your result will be stored within the storage 'gon:output' in the nbt tag 'output'
/data get storage gon:output output
| Compatibility | Minecraft 1.21 |
| Tags |
6515351
119



Have something to say?