Suggestion Matrix datatypes Req.

Jimmy

Active member
3rd Party Module Dev
Tutorial Author
Joined
Jan 2, 2020
Messages
873
Inbuilt datatypes Vec2f and AffineMat3f

' Datatype AffineMat3f so you could do things like :
' -------------------------------------------------------
' map = New AffineMat3f().Translate(p0).Rotate(0) .Scale(s,s)
' go = -go2 * map
' canvas.Matrix = go2

Code:
' A few features that I miss being inbuilt into Cerberus:

' Vec2 datatype

Import mojo2

Function Main()
    New MyApp
End


Class Vec2f
    Field x:Float
    Field y:Float
End

Class MyApp Extends App

    Method OnCreate()

        Local p0:Vec2f, p1:Vec2f
        Local myVector:Vec2f = New Vec2f
   
        myVector.x = 32.0
        myVector.y = 16.8
        Print myVector.x
        Print myVector.y
   
    End

End

' Datatype AffineMat3f so you could do things like :
' -------------------------------------------------------
' map = New AffineMat3f().Translate(pos).Rotate(0) .Scale(s,s)
' go = -go2 * map
' canvas.Matrix = go2
 
Last edited:
Top Bottom