Improve documentation for the new libraries
This commit is contained in:
parent
68d41ba1bc
commit
123fb9440d
2 changed files with 13 additions and 11 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue