This wiki is closed in favour of the new wiki. Information shown is likely to be very out of date. |
Difference between revisions of "User:Space/Template:DrawLine"
From Discovery Wiki
Jump to navigationJump to searchm |
m |
||
Line 2: | Line 2: | ||
<!-- Calculates the length of the line --> | <!-- Calculates the length of the line --> | ||
{{#expr: (({{{1}}}-{{{3}}})^2+({{{2}}}*{{{4}}})^2)^0.5}} | {{#expr: (({{{1}}}-{{{3}}})^2+({{{2}}}*{{{4}}})^2)^0.5}} | ||
− | |||
− | |||
{{#expr: (atan2(({{{4}}}-{{{2}}})/({{{3}}}-{{{1}}})))*180/pi}} | {{#expr: (atan2(({{{4}}}-{{{2}}})/({{{3}}}-{{{1}}})))*180/pi}} | ||
Line 9: | Line 7: | ||
<!-- Renders the line --> | <!-- Renders the line --> | ||
<div style="-webkit-transform-origin: 0 100%; height: {{{5}}}px; background: #000;"></div> | <div style="-webkit-transform-origin: 0 100%; height: {{{5}}}px; background: #000;"></div> | ||
− | <noinclude>Test: {{User:Space/Template:DrawLine| | + | <noinclude>Test: {{User:Space/Template:DrawLine|0|2|0|9|3}}</noinclude> |
<noinclude><!-- var length = Math.sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2)); | <noinclude><!-- var length = Math.sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2)); |
Revision as of 11:18, 8 April 2013
{{User:Space/Template:DrawLine|x1|y1|x2|y2|width in px}} Expression error: Unrecognized punctuation character "{".
Expression error: Unexpected ( operator.
Test: 18
Expression error: Unexpected ( operator.