▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Моды/Tarso
Tarso

Tarso

Mathematical utilities for score calculations.

77
0

Tarso is a library datapack containing general mathematical utilities for score calculations without using macro functions.

Usage

Calculation

To calculation, put the score in math.target and (maybe) math.source, then call operations, the score returned will be presented in math.target.

OperationFunctionGeneral ExpressionDesciption
Left Shiftmath:lsmath.target = math.target >> math.source
Right Shiftmath:rsmath.target = math.target << math.source
Additionmath:addmath.target = math.target + math.source
Multiplicationmath:mulmath.target = math.target * math.source
Powermath:powmath.target = math.target ^ math.source
Subtractionmath:submath.target = math.target - math.source
Divisionmath:divmath.target = math.target / math.source
Logarithmmath:logmath.target = log math.source (math.target)
Common Logarithmmath:lgmath.target = log 10 (math.target)
Natural Logarithmmath:lnmath.target = log 2 (math.target)
Square Rootmath:sqrtmath.target = sqrt(math.target)
Modulusmath:modmath.target = math.target % math.source
Remaindermath:remmath.target = math.target % math.source
Negativitymath:negmath.target = -math.target
Absolutationmath:absmath.target = (math.target < 0) ? -math.target : math.target
Signmath:sigmath.target = math.target / (math.target < 0) ? -math.target : math.target
Factorialmath:factmath.target = math.target!
Permutationmath:permmath.target = P(math.target, math.source)
Combinationmath:combmath.target = C(math.target, math.source)
Hypotmath:hypmath.target = sqrt(**math.target + **math.source)
Vectormath:vecmath.x = CORDIC(math.target).x math.y = CORDIC(math.target).yPrecision is controled by math.source.
Tangentmath:tanmath.target = tan(math.target)Precision is controled by math.source.
Cotangentmath:cotmath.target = cot(math.target)Precision is controled by math.source.
Sinemath:sinmath.target = sin(math.target)Precision is controled by math.source.
Cosinemath:cosmath.target = cos(math.target)Precision is controled by math.source.

The Stack

Tarso comes with a stack of 16 sorts. To transfer scores, put the score in math.buffer before pushing and the score poped out will be presented in math.buffer.

OperationFunction
Pushmath:push
Popmath:pop
Seekmath:seek

Notes

  1. Objectives other than those belong to the stack can be overwritten during calculations.

  2. Pushing a score into the stack while it's full make no sense.

FAQ

1. Why is the natural logarithm inaccurate?

It cannot be fixed except using large-number calculation, which is extremely slow. Currently it has a base of 2.

Совместимость

Minecraft: Java Edition

1.21.x1.20.x

Платформы

Поддерживаемые окружения

Клиент и сервер

Детали

Лицензия:GPL-3.0-or-later
Опубликован:1 год назад
Обновлён:1 год назад
Главная