Editing Template:Lit Radius
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 7: | Line 7: | ||
*3: target light level - defaults to 0.3, which is all you probably want | *3: target light level - defaults to 0.3, which is all you probably want | ||
===Examples=== | ===Examples=== | ||
− | + | Example: <code><nowiki>{{Lit Radius|12|{{#expr:217+217+208}}}}</nowiki></code> -> {{Lit Radius|12|{{#expr:217+217+208}}}} | |
− | |||
− | |||
Combine with <code>#expr round</code> to improve readability: <code><nowiki>{{#expr: {{Lit Radius|12|{{#expr:217+217+208}}}} round 2}}</nowiki></code> -> {{#expr: {{Lit Radius|12|{{#expr:217+217+208}}}} round 2}} | Combine with <code>#expr round</code> to improve readability: <code><nowiki>{{#expr: {{Lit Radius|12|{{#expr:217+217+208}}}} round 2}}</nowiki></code> -> {{#expr: {{Lit Radius|12|{{#expr:217+217+208}}}} round 2}} | ||
===Maths=== | ===Maths=== | ||
Line 40: | Line 38: | ||
-->{{#vardefine:a0|{{#expr:0 - {{#var:glow_radius}}*2/3}}}}<!-- | -->{{#vardefine:a0|{{#expr:0 - {{#var:glow_radius}}*2/3}}}}<!-- | ||
-->{{#vardefine:a2|{{#expr:{{#var:glow_radius}}*({{#var:f}}*5/3 - 1)}}}}<!-- | -->{{#vardefine:a2|{{#expr:{{#var:glow_radius}}*({{#var:f}}*5/3 - 1)}}}}<!-- | ||
− | cardano | + | cardano algorithm (a1 = 0) |
-->{{#vardefine:q|{{#expr:0 - {{#var:a2}}^2/9}}}}<!-- | -->{{#vardefine:q|{{#expr:0 - {{#var:a2}}^2/9}}}}<!-- | ||
-->{{#vardefine:r|{{#expr:0 - {{#var:a0}}/2 - {{#var:a2}}^3/27}}}}<!-- | -->{{#vardefine:r|{{#expr:0 - {{#var:a0}}/2 - {{#var:a2}}^3/27}}}}<!-- | ||
− | + | -->{{#vardefine:u|{{#expr:({{#var:r}} + ({{#var:r}}^2 + {{#var:q}}^3)^(1/2))^(1/3)}}}}<!-- | |
− | + | -->{{#vardefine:v|{{#expr:({{#var:r}} - ({{#var:r}}^2 + {{#var:q}}^3)^(1/2))^(1/3)}}}}<!-- | |
− | + | -->{{#vardefine:z1|{{#expr:{{#var:u}} + {{#var:v}} - {{#var:a2}}/3}}}}<!-- | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
-->{{#expr:{{#var:z1}} - 1}} | -->{{#expr:{{#var:z1}} - 1}} | ||
</includeonly> | </includeonly> |