Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @function pi(){
- @return 3.14;
- }
- // возведение в степень
- @function pow($val, $num){
- $result: $num;
- @for $i from 1 through $num{
- $result: $result * $num;
- }
- @return $result;
- }
- @function sin($deg){
- $c: 9; // точность тейлора (кратно 2+1)
- $result: $deg;
- @for$i from 3 through $c{
- $result: $result + pow($deg, $i) / тут_факториал_влом_пилить($i);
- $i: $i+1;
- }
- @return $result;
- }
- // и потом фигачишь:
- @mixin mrotate($deg){
- @include rotate($deg);
- $rad: ($deg * pi()) / 180;
- $cos: cos($rad);
- $sin: sin($rad);
- filter: progid:DXImageTransform.Microsoft.Matrix(sizingMethod="auto expand", M11=#{$cos}, M12 = #{-$sin}, M21 =#{$sin}, M22 = #{$cos});
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement