Skip to content

Instantly share code, notes, and snippets.

@Weiyuan-Lane
Last active June 23, 2019 09:33
Show Gist options
  • Save Weiyuan-Lane/a02780a5ddd01e59170306b48552059a to your computer and use it in GitHub Desktop.
Save Weiyuan-Lane/a02780a5ddd01e59170306b48552059a to your computer and use it in GitHub Desktop.
Sample to demonstrate computing of the side length of a hexagon using trigonometry
@import 'tan';
// Some random units, as an example
$hexagonCoreLength: 100px;
$hexagonBorderThickness: 2px;
$computationAngle: $PI/6;
$adjacentLength: $hexagonCoreLength + 2 * $hexagonBorderThickness;
// Compute the hexagon length for the side before using it
$hexagonSideLength: tan($computationAngle) * $adjacentLength;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment