diff --git a/libraries/Bitwise.elm b/libraries/Bitwise.elm index d48b2b6..6d0179b 100644 --- a/libraries/Bitwise.elm +++ b/libraries/Bitwise.elm @@ -13,22 +13,22 @@ module Bitwise where import Native.Bitwise -{-| Bitwise “and” +{-| Bitwise AND -} and : Int -> Int -> Int and = Native.Bitwise.and -{-| Bitwise “or” +{-| Bitwise OR -} or : Int -> Int -> Int or = Native.Bitwise.or -{-| Bitwise “xor” +{-| Bitwise XOR -} xor : Int -> Int -> Int xor = Native.Bitwise.xor -{-| Flip each bit individually, often called “bitwise not” +{-| Flip each bit individually, often called bitwise NOT -} complement : Int -> Int complement = Native.Bitwise.complement @@ -51,7 +51,7 @@ whatever is the topmost bit. This can be used to divide numbers by powers of two This is called an [arithmatic right shift](http://en.wikipedia.org/wiki/Bitwise_operation#Arithmetic_shift), -often written (>>), and sometimes called a “sign-propagating” +often written (>>), and sometimes called a sign-propagating right shift because it fills empty spots with copies of the highest bit. -} shiftRight : Int -> Int -> Int @@ -66,7 +66,7 @@ zeros. This is called an [logical right shift](http://en.wikipedia.org/wiki/Bitwise_operation#Logical_shift), often written (>>>), -and sometimes called a “zero-fill” right shift because it fills empty spots +and sometimes called a zero-fill right shift because it fills empty spots with zeros. -} shiftRightLogical : Int -> Int -> Int diff --git a/libraries/Transform2D.elm b/libraries/Transform2D.elm index bbdbc89..48d3450 100644 --- a/libraries/Transform2D.elm +++ b/libraries/Transform2D.elm @@ -1,14 +1,16 @@ module Transform2D where -{-| A library for performing [2D matrix transformations](http://en.wikipedia.org/wiki/Transformation_matrix#Affine_transformations). +{-| A library for performing [2D matrix transformations][affine]. It is used primarily with the `groupTransform` function from `Graphics.Collage` and allows you to do things like rotation, scaling, translation, shearing, and reflection. Note that all the matrices in this library are 3x3 matrices of homogeneous -coordinates, used for affine transformations. Since the third row as always 0 0 -1, we omit this below. +coordinates, used for [affine transformations][affine]. Since the bottom row as +always `0 0 1` in these matrices, it is omitted in the diagrams below. -# Basic Transforms -@docs identity, matrix, rotation + [affine]: http://en.wikipedia.org/wiki/Transformation_matrix#Affine_transformations + +# Transforms +@docs identity, matrix, rotation, translation, scale, scaleX, scaleY # Multiplication @docs multiply