ratio

package
v0.35.5 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2022 License: MIT Imports: 0 Imported by: 5

Documentation

Index

Constants

View Source
const (
	// Ratios are always width/height
	RatioTelevisionEarly float64 = 5 / 4 // 1.25/1
	RatioTelevision      float64 = 4 / 3 // 1.3/1
	RatioAcademy         float64 = 1.375 / 1.0
	RatioPhoto           float64 = 3 / 2
	RatioGolden          float64 = 1.6180 / 1
)

Variables

This section is empty.

Functions

func HeightToWidth

func HeightToWidth(height, ratio float64) float64

func RatioInt

func RatioInt(x1, y1, x2, y2 int) (int, int)

RatioInt generates the missing value in a ratio calculation. Missing number should be in second set of coordinates.

func WidthToHeight

func WidthToHeight(width, ratio float64) float64

Types

This section is empty.

Jump to

Keyboard shortcuts

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