<commit_before>// Copyright 2015, <NAME> <<EMAIL>>
// See the LICENSE file for more details.

package glider

import (
	"math"
)

// Vec3 is a 3 dimenional vector
type Vec3 [3]float32

// Vec2 is a 2 dimenional vector
type Vec2 [2]float32

// AABSquare is a axis aligned sqare shape defined by a minimum and maximum corner.
type AABSquare struct {
	// Min is the corner of the box opposite of Max. (e.g. lower-left corner)
	Min Vec2

	// Max is the corner of the box opposite of Min. (e.g. top-right corner)
	Max Vec2

	// Tags provides a way to label an AABB geometry in a custom application
	// (e.g. labelling a collision as "wall" or "floor").
	Tags []string
}

// IntersectPoint tests to see if the point is intersects the AABSquare.
func (aabs *AABSquare) IntersectPoint(v *Vec2) bool {
	if v[0] < aabs.Min[0] || v[0] > aabs.Max[0] {
		return false
	}
	if v[1] < aabs.Min[1] || v[1] > aabs.Max[1] {
		return false
	}
	return true
}

// AABBox is a axis aligned cube shape defined by a minimum and maximum corner.
type AABBox struct {
	// Min is the corner of the box opposite of Max. (e.g. lower-back-left corner)
	Min Vec3

	// Max is the corner of the box opposite of Min. (e.g. top-front-right corner)
	Max Vec3

	// Tags provides a way to label an AABB geometry in a custom application
	// (e.g. labelling a collision as "wall" or "floor").
	Tags []string<commit_msg>Added some simple creation methods.<commit_after>// Copyright 2015, <NAME> <<EMAIL>>
// See the LICENSE file for more details.

package glider

import (
	"math"
)

// Vec3 is a 3 dimenional vector
type Vec3 [3]float32

// Vec2 is a 2 dimenional vector
type Vec2 [2]float32

// AABSquare is a axis aligned sqare shape defined by a minimum and maximum corner.
type AABSquare struct {
	// Min is the corner of the box opposite of Max. (e.g. lower-left corner)
	Min Vec2

	// Max is the corner of the box opposite of Min. (e.g. top-right corner)
	Max Vec2

	// Tags provides a way to label an AABB geometry in a custom application
	// (e.g. labelling a collision as "wall" or "floor").
	Tags []string
}

// NewAABSquare creates a new AABSquare object
func NewAABSquare() *AABSquare {
	aabs := new(AABSquare)
	return aabs
}

// IntersectPoint tests to see if the point is intersects the AABSquare.
func (aabs *AABSquare) IntersectPoint(v *Vec2) bool {
	if v[0] < aabs.Min[0] || v[0] > aabs.Max[0] {
		return false
	}
	if v[1] < aabs.Min[1] || v[1] > aabs.Max[1] {
		return false
	}
	return true
}

// AABBox is a axis aligned cube shape defined by a minimum and maximum corner.
type AABBox struct {
	// Min is the corner of the box opposite of Max. (e.g. lower-back-left corner)
	Min Vec3

	// Max is the corner of the box opposite of Min. (e.g. top-front-right corner)
	Max Vec3

	// Tags provides a way to label an AABB geometry in a custom application
	// (e.g. labelling a collision as "wall" or "floor").
	Tags []string
}

// NewAABBox creates a new AABBox object
func NewAABBox() *AABBox {
	aabb := new(AABBox)
	return aabb
{'fraction_non_alphanumeric': 0.10296567810729756, 'fraction_numerical': 0.019326891036321226, 'mean_word_length': 3.181058495821727, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4166674', 'n_tokens_mistral': 1080, 'n_tokens_neox': 1037, 'n_words': 443}