Brickadia logo Brickadia icon
Search Blog Servers Contact
Login
Back to gallery
Preview of Formula gate
Prefab preview
Prefab

Formula gate

Created by Ldr20

Generated with an LLM and Wirescript, it all seems to work. You might not want to open the microchip though lmao. Formula gate. Evaluates a math formula typed as text, as an alternative to wiring gates. Feed a formula string into "formula" (or just write it in the variable gate on top) and numbers into the a..h arguments. If ok is false, the formula was invalid and result is 0. Formulas look like sqrt(a*a + b*b), in a single line. They support + - * / % ^, parentheses, and functions like sin, max and clamp. Angles are in radians. To work in degrees, convert with rad() and deg(). Pi and tau (2π) are built in but e is an argument, so use exp(1) for Euler's number. New lines are not supported. Lerp is clamped. Values too big end up as zero. Finally, scientific notation is not supported. Functions: sin cos tan asin acos atan sinh cosh tanh exp ln sqrt abs sign round floor ceil log (base 10), log2, frac (x − floor x), rad (deg→rad), deg (rad→deg) atan2(y,x), pow(x,y), min(x,y), max(x,y), mod(x,y) (floored), logb(x,base) clamp(x,lo,hi), lerp(a,b,t)

Microchip
likes
views
View in game

Published
September 19, 2026 at UTC
Updated
September 19, 2026 at UTC
Version
1
Share code
d2v-c6a-n1a

User-submitted content

This page was automatically generated from content submitted by a user. It has not been authored, verified, or endorsed by Brickadia, LLC. Report inappropriate or unlawful content here.

More by Ldr20

Explore more prefabs from this creator.

Magnet cubes
1
13
Ldr20
Decal suspension
0
11
Ldr20
Decal piston
0
12
Ldr20
Small piston
0
14
Ldr20
Servo controller v2
0
19
Ldr20
Trammel gears chained
1
30
Ldr20

More prefabs to explore

Keep discovering what the Brickadia community is building.

Browse all
VotV satellite dish
2
17
danijooj
Carcaça 2
3
18
Radio BR BRASILEIRO
Parts/cars pack complet
3
32
Radio BR BRASILEIRO
A D REX (able to turn)
1
5
rerere284
Cadeira2
2
7
Radio BR BRASILEIRO
Rádio atualizado
2
14
Radio BR BRASILEIRO
Pack motores3
2
15
Radio BR BRASILEIRO
Pack motores 2
2
13
Radio BR BRASILEIRO
Realistic Car
1
21
MattyMartian15
heart eater piter wife
1
7
Piter rabbit
The Power (to be his friend) (moonchild)
1
25
Grimbo
van 4
1
26
Radio BR BRASILEIRO

© 2025 Brickadia, LLC • All rights reserved.
Brickadia is a registered trademark of Brickadia, LLC.

Navigation Search Blog Servers Contact Login
Support Contact Media Kit
Legal Terms Privacy