Skip to content

Instantly share code, notes, and snippets.

@joetifa2003
joetifa2003 / coll_updated.go
Created December 6, 2023 09:31
Resolving player stucj problem
package collision
import (
rl "github.com/gen2brain/raylib-go/raylib"
)
type Line struct {
Start rl.Vector2
End rl.Vector2
}
@joetifa2003
joetifa2003 / coll.go
Last active December 6, 2023 06:33
Collision detection and resloution in go
package collision
import (
rl "github.com/gen2brain/raylib-go/raylib"
)
type Line struct {
Start rl.Vector2
End rl.Vector2
}
@joetifa2003
joetifa2003 / +page.svelte
Created January 17, 2023 00:10
Svelte form loading
<Form action="?/deleteTodo" let:submitting>
<input type="hidden" name="todoId" value={todo.id} />
<button type="submit" disabled={submitting}>Delete</button>
</Form>
@joetifa2003
joetifa2003 / main.go
Last active December 3, 2022 23:17
Malloc implementation in pure go
package main
import (
"math"
"sync"
"unsafe"
"github.com/edsrzf/mmap-go"
)
@joetifa2003
joetifa2003 / main.go
Last active November 25, 2022 15:08
Golang array field slowing struct
package main
import "unsafe"
type ValueType int
const (
VALUE_INT ValueType = iota
VALUE_ARRAY
)