on master help sign in
Move docs around a bit
commitf4a6b3e334d06eb1195240897e2c6f34b3b286a3 authorEvan Czaplicki <info@elm-lang.org> dateTue 6 May 2014, 13:51 (12 years ago) parent2b5f6c9
1 file changed+17−11
libraries/Math/Matrix4.elm+17−11
libraries/Math/Matrix4.elm+17−11
@@ -7,19 +7,25 @@ This library uses the convention that the prefix `make` is creating a new
77array, whereas without the prefix, you are applying some transform to an
88existing matrix.
99
10−@docs mul4x4
10+# Create
11+
12+@docs identity
1113
1214# Operations
1315
14−@docs identity, inverseOrthonormal, mul, mulAffine, transpose, makeBasis
16+@docs inverseOrthonormal, mul, mulAffine, mulVec3, transpose, makeBasis
1517
1618# Projections
1719
1820@docs makeFrustrum, makePerspective, makeOrtho, makeOrtho2D, makeLookAt
1921
20−# Transforms
22+# Apply Transformations
23+
24+@docs rotate, scale, scale3, translate, translate3
25+
26+# Create Transformations
2127
22−@docs makeRotate, rotate, makeScale3, makeScale, scaleM3, scaleM, makeTranslate3, makeTranslate, translate3, translate
28+@docs makeRotate, makeScale, makeScale3, makeTranslate, makeTranslate3
2329
2430-}
2531
@@ -30,8 +36,8 @@ data Mat4 = Mat4
3036
3137{-| Multiply a vector by a 4x4 matrix: m * v
3238-}
33−mul4x4 : Mat4 -> Vec3 -> Vec3
34−mul4x4 = Native.MJS.v3mul4x4
39+mulVec3 : Mat4 -> Vec3 -> Vec3
40+mulVec3 = Native.MJS.v3mul4x4
3541
3642{-| A matrix with all 0s, except 1s on the diagonal.
3743-}
@@ -114,7 +120,7 @@ mulAffine = Native.MJS.m4x4mulAffine
114120makeRotate : Float -> Vec3 -> Mat4
115121makeRotate = Native.MJS.m4x4makeRotate
116122
117−{-| Concatenates a rotation of angle radians about the axis to the given matrix.
123+{-| Concatenates a rotation in radians about an axis to the given matrix.
118124-}
119125rotate : Float -> Vec3 -> Mat4 -> Mat4
120126rotate = Native.MJS.m4x4rotate
@@ -133,13 +139,13 @@ makeScale = Native.MJS.m4x4makeScale
133139
134140{-| Concatenates a scaling to the given matrix.
135141-}
136−scaleM3 : Float -> Float -> Float -> Mat4 -> Mat4
137−scaleM3 = Native.MJS.m4x4scale3
142+scale3 : Float -> Float -> Float -> Mat4 -> Mat4
143+scale3 = Native.MJS.m4x4scale3
138144
139145{-| Concatenates a scaling to the given matrix.
140146-}
141−scaleM : Vec3 -> Mat4 -> Mat4
142−scaleM = Native.MJS.m4x4scale
147+scale : Vec3 -> Mat4 -> Mat4
148+scale = Native.MJS.m4x4scale
143149
144150{-|
145151Creates a transformation matrix for translating by 3 scalar values, one for