generate

package
v0.0.0-...-9c88ebf Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package generate helps generate random data from the types in the d2 package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Polar

func Polar() d2.V

Polar returns a random vector with length 1.

func Pt

func Pt() d2.Pt

Pt generates a random point in the range (0,0) to (1,1)

func PtIn

func PtIn(pt d2.Pt) d2.Pt

PtIn generates a random point from (0,0) to the given point.

func PtNorm

func PtNorm() d2.Pt

PtNorm returns a random point with a normal distribution.

func V

func V() d2.V

V generates a random Vector in the range (0,0) to (1,1)

func VNorm

func VNorm() d2.Pt

VNorm returns a random Vector with a normal distribution.

Types

This section is empty.

Jump to

Keyboard shortcuts

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