geometry

package
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 19, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Point

type Point[T constraintsi.Number] struct {
	X T
	Y T
}

两个原点不重合的坐标系O1,O2,均为x轴向右,y轴向下。O2在O1内部,且经过顺时针旋转c度。其中的点分别用(x1,y1),(x2,y2)表示,已知某个点在两个坐标系中的坐标(x1,y1),(x2,y2),以及另一点在O2内的坐标(x2,y2),求该点在O1内的坐标(x1,y1) ------------------------------ | 、 | / 、 | / 、 | / 、 | / | | Point 结构体用于表示一个点

func TransformPoint

func TransformPoint[T constraintsi.Number](p1InO2, p2InO1, p2InO2 Point[T], angleDeg float64) Point[T]

TransformPoint transforms a point from coordinate system a2 to a1

type Rectangle

type Rectangle[T constraintsi.Number] struct {
	Min, Max Point[T]
}

func Rect

func Rect[T constraintsi.Number](x0, y0, x1, y1 T) Rectangle[T]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL