on master help sign in
Get rid of double backslashes, which have mysteriously changed behavior and now actually show up twice
5b2ba67Evan Czaplicki
libraries/Transform2D.elm+8−8
@@ -18,8 +18,8 @@ data Transform2D = Transform2D
18not change anything, but it can come in handy as a default or
18not change anything, but it can come in handy as a default or
19base case.
19base case.
20
20
21− / 1 0 \\
21+ / 1 0 \
22− \\ 0 1 /
22+ \ 0 1 /
23-}
23-}
24identity : Transform2D
24identity : Transform2D
25identity = Native.Transform2D.identity
25identity = Native.Transform2D.identity
@@ -29,8 +29,8 @@ such as scales, shears, reflections, and translations.
29
29
30 matrix a b c d dx dy
30 matrix a b c d dx dy
31
31
32− / a b \\
32+ / a b \
33− \\ c d /
33+ \ c d /
34
34
35And `dx` and `dy` are the translation values.
35And `dx` and `dy` are the translation values.
36-}
36-}
@@ -40,8 +40,8 @@ matrix = Native.Transform2D.matrix
40{-| Creates a [rotation matrix](http://en.wikipedia.org/wiki/Rotation_matrix).
40{-| Creates a [rotation matrix](http://en.wikipedia.org/wiki/Rotation_matrix).
41Given an angle t, it creates a counterclockwise rotation matrix:
41Given an angle t, it creates a counterclockwise rotation matrix:
42
42
43− / cos t -sin t \\
43+ / cos t -sin t \
44− \\ sin t cos t /
44+ \ sin t cos t /
45-}
45-}
46rotation : Float -> Transform2D
46rotation : Float -> Transform2D
47rotation = Native.Transform2D.rotation
47rotation = Native.Transform2D.rotation
@@ -50,8 +50,8 @@ rotation = Native.Transform2D.rotation
50
50
51 multiply a b
51 multiply a b
52
52
53− / a11 a12 \\ . / b11 b12 \\
53+ / a11 a12 \ . / b11 b12 \
54− \\ a21 a22 / \\ b21 b22 /
54+ \ a21 a22 / \ b21 b22 /
55-}
55-}
56multiply : Transform2D -> Transform2D -> Transform2D
56multiply : Transform2D -> Transform2D -> Transform2D
57multiply = Native.Transform2D.multiply
57multiply = Native.Transform2D.multiply