on master help sign in
Improve documentation for the new libraries
commit123fb9440dcf09dddea68ebc47dfe4b11651bd6c authorEvan Czaplicki <info@elm-lang.org> dateTue 17 Dec 2013, 15:20 (13 years ago) parent68d41ba
2 files changed+13−11
libraries/Bitwise.elm+6−6 libraries/Transform2D.elm+7−5
libraries/Bitwise.elm+6−6
@@ -13,22 +13,22 @@ module Bitwise where
1313
1414import Native.Bitwise
1515
16−{-| Bitwise &ldquo;and&rdquo;
16+{-| Bitwise AND
1717-}
1818and : Int -> Int -> Int
1919and = Native.Bitwise.and
2020
21−{-| Bitwise &ldquo;or&rdquo;
21+{-| Bitwise OR
2222-}
2323or : Int -> Int -> Int
2424or = Native.Bitwise.or
2525
26−{-| Bitwise &ldquo;xor&rdquo;
26+{-| Bitwise XOR
2727-}
2828xor : Int -> Int -> Int
2929xor = Native.Bitwise.xor
3030
31−{-| Flip each bit individually, often called &ldquo;bitwise not&rdquo;
31+{-| Flip each bit individually, often called bitwise NOT
3232-}
3333complement : Int -> Int
3434complement = Native.Bitwise.complement
@@ -51,7 +51,7 @@ whatever is the topmost bit. This can be used to divide numbers by powers of two
5151
5252This is called an [arithmatic right
5353shift](http://en.wikipedia.org/wiki/Bitwise_operation#Arithmetic_shift),
54−often written (>>), and sometimes called a &ldquo;sign-propagating&rdquo;
54+often written (>>), and sometimes called a sign-propagating
5555right shift because it fills empty spots with copies of the highest bit.
5656-}
5757shiftRight : Int -> Int -> Int
@@ -66,7 +66,7 @@ zeros.
6666
6767This is called an [logical right
6868shift](http://en.wikipedia.org/wiki/Bitwise_operation#Logical_shift), often written (>>>),
69−and sometimes called a &ldquo;zero-fill&rdquo; right shift because it fills empty spots
69+and sometimes called a zero-fill right shift because it fills empty spots
7070with zeros.
7171-}
7272shiftRightLogical : Int -> Int -> Int
libraries/Transform2D.elm+7−5
@@ -1,14 +1,16 @@
11module Transform2D where
2−{-| A library for performing [2D matrix transformations](http://en.wikipedia.org/wiki/Transformation_matrix#Affine_transformations).
2+{-| A library for performing [2D matrix transformations][affine].
33It is used primarily with the `groupTransform` function from `Graphics.Collage` and
44allows you to do things like rotation, scaling, translation, shearing, and reflection.
55
66Note that all the matrices in this library are 3x3 matrices of homogeneous
7−coordinates, used for affine transformations. Since the third row as always 0 0
8−1, we omit this below.
7+coordinates, used for [affine transformations][affine]. Since the bottom row as
8+always `0 0 1` in these matrices, it is omitted in the diagrams below.
99
10−# Basic Transforms
11−@docs identity, matrix, rotation
10+ [affine]: http://en.wikipedia.org/wiki/Transformation_matrix#Affine_transformations
11+
12+# Transforms
13+@docs identity, matrix, rotation, translation, scale, scaleX, scaleY
1214
1315# Multiplication
1416@docs multiply