vlib: fix several typos
parent
3d2c266980
commit
1a099c9284
|
@ -262,10 +262,10 @@ pub fn join(input1 BitField, input2 BitField) BitField {
|
|||
* options:
|
||||
* (a) nr of slots in output is the sum of inputs' slots. In this
|
||||
* case, the nr of bits in the last slot of output is less than the
|
||||
* nr of bits in second input (i.e. ), OR
|
||||
* nr of bits in the second input (i.e. ), OR
|
||||
* (b) nr of slots of output is the sum of inputs' slots less one
|
||||
* (i.e. less iterations needed). In this case, the nr of bits in
|
||||
* the last slot of output is greater than the nr of bits in second
|
||||
* the last slot of output is greater than the nr of bits in the second
|
||||
* input.
|
||||
* If offset_bit is zero, no additional copies needed.
|
||||
*/
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
//
|
||||
// - parsing flags like '--flag' or '--stuff=things' or '--things stuff'
|
||||
// - handles bool, int, float and string args
|
||||
// - is able to pring usage
|
||||
// - is able to print usage
|
||||
// - handled unknown arguments as error
|
||||
//
|
||||
// Usage example:
|
||||
|
@ -45,7 +45,7 @@
|
|||
|
||||
module flag
|
||||
|
||||
// data object storing informations about a defined flag
|
||||
// data object storing information about a defined flag
|
||||
struct Flag {
|
||||
pub:
|
||||
name string // name as it appears on command line
|
||||
|
@ -105,7 +105,7 @@ fn (fs mut FlagParser) add_flag(n string, a byte, u, vd string) {
|
|||
}
|
||||
|
||||
// private: general parsing a single argument
|
||||
// - search args for existance
|
||||
// - search args for existence
|
||||
// if true
|
||||
// extract the defined value as string
|
||||
// else
|
||||
|
@ -213,7 +213,7 @@ pub fn (fs mut FlagParser) int(n string, i int, u string) int {
|
|||
return fs.int_(n, `\0`, i, u)
|
||||
}
|
||||
|
||||
// defining and parsing a flaot flag
|
||||
// defining and parsing a float flag
|
||||
// if defined
|
||||
// the value is returned (float)
|
||||
// else
|
||||
|
@ -228,7 +228,7 @@ pub fn (fs mut FlagParser) float_(n string, a byte, f f32, u string) f32 {
|
|||
return parsed.f32()
|
||||
}
|
||||
|
||||
// defining and parsing a flaot flag
|
||||
// defining and parsing a float flag
|
||||
// if defined
|
||||
// the value is returned (float)
|
||||
// else
|
||||
|
@ -309,7 +309,7 @@ pub fn (fs FlagParser) usage() string {
|
|||
// finalize argument parsing -> call after all arguments are defined
|
||||
//
|
||||
// all remaining arguments are returned in the same order they are defined on
|
||||
// commandline
|
||||
// command line
|
||||
//
|
||||
// if additional flag are found (things starting with '--') an error is returned
|
||||
// error handling is up to the application developer
|
||||
|
|
|
@ -87,7 +87,7 @@ pub fn new_context(cfg Cfg) &GG {
|
|||
shader.set_mat4('projection', projection)
|
||||
}
|
||||
else {
|
||||
// TODO move to function (allow volt functions to return arrrays without allocations)
|
||||
// TODO move to function (allow volt functions to return arrays without allocations)
|
||||
// i := glm.identity3()
|
||||
shader.set_mat4('projection', glm.identity())
|
||||
}
|
||||
|
@ -200,7 +200,7 @@ pub fn (ctx &GG) draw_rect(x, y, w, h f32, c gx.Color) {
|
|||
// wrong order
|
||||
// // ctx.draw_triangle(x, y, x + w, y, x + w, y + h, c)
|
||||
// // ctx.draw_triangle(x, y, x, y + h, x + w, y + h, c)
|
||||
// good order. counter clock wise
|
||||
// good order. counter clockwise
|
||||
// ctx.draw_triangle(x, y, x, y + h, x + w, y + h, c)
|
||||
// ctx.draw_triangle(x, y, x + w, y + h, x + w, y, c)
|
||||
ctx.draw_rect2(x, y, w, h, c)
|
||||
|
|
|
@ -51,22 +51,22 @@ pub fn abs(a f64) f64 {
|
|||
return a
|
||||
}
|
||||
|
||||
// acos calculates inversed cosine (arccosine).
|
||||
// acos calculates inverse cosine (arccosine).
|
||||
pub fn acos(a f64) f64 {
|
||||
return C.acos(a)
|
||||
}
|
||||
|
||||
// asin calculates inversed sine (arcsine).
|
||||
// asin calculates inverse sine (arcsine).
|
||||
pub fn asin(a f64) f64 {
|
||||
return C.asin(a)
|
||||
}
|
||||
|
||||
// atan calculates inversed tangent (arctangent).
|
||||
// atan calculates inverse tangent (arctangent).
|
||||
pub fn atan(a f64) f64 {
|
||||
return C.atan(a)
|
||||
}
|
||||
|
||||
// atan2 calculates inversed tangent with two arguments, returns angle between the X axis and the point.
|
||||
// atan2 calculates inverse tangent with two arguments, returns the angle between the X axis and the point.
|
||||
pub fn atan2(a, b f64) f64 {
|
||||
return C.atan2(a, b)
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ pub fn degrees(radians f64) f64 {
|
|||
return radians * (180.0 / Pi)
|
||||
}
|
||||
|
||||
// exp calculates exponement of the number (math.pow(math.E, a)).
|
||||
// exp calculates exponent of the number (math.pow(math.E, a)).
|
||||
pub fn exp(a f64) f64 {
|
||||
return C.exp(a)
|
||||
}
|
||||
|
@ -117,12 +117,12 @@ pub fn digits(_n, base int) []int {
|
|||
return res
|
||||
}
|
||||
|
||||
// erf computes the error funtion value
|
||||
// erf computes the error function value
|
||||
pub fn erf(a f64) f64 {
|
||||
return C.erf(a)
|
||||
}
|
||||
|
||||
// erfc computes the complimentary error function value
|
||||
// erfc computes the complementary error function value
|
||||
pub fn erfc(a f64) f64 {
|
||||
return C.erfc(a)
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ mut:
|
|||
c_cc [12]int //NCCS == 12. Cant use the defined value here
|
||||
}
|
||||
|
||||
// Used to collect the screen informations
|
||||
// Used to collect the screen information
|
||||
struct winsize {
|
||||
ws_row u16
|
||||
ws_col u16
|
||||
|
|
|
@ -210,13 +210,13 @@ pub fn (zentry mut zip_ptr) create_entry(name string) bool {
|
|||
/**
|
||||
* read_entry extracts the current zip entry into output buffer.
|
||||
*
|
||||
* The function allocates sufficient memory for a output buffer.
|
||||
* The function allocates sufficient memory for an output buffer.
|
||||
*
|
||||
* @param zip zip archive handler.
|
||||
* @param buf output buffer.
|
||||
* @param bufsize output buffer size (in bytes).
|
||||
*
|
||||
* @note remember to release memory allocated for a output buffer.
|
||||
* @note remember to release the memory allocated for an output buffer.
|
||||
* for large entries, please take a look at zip_entry_extract function.
|
||||
*
|
||||
* @return the return code - the number of bytes actually read on success.
|
||||
|
|
|
@ -46,8 +46,8 @@ pub fn cursor_back(n int) {
|
|||
move(n,'D')
|
||||
}
|
||||
|
||||
// type: 0 -> current cursor postion to end of the screen
|
||||
// type: 1 -> current cursor postion to beginning of the screen
|
||||
// type: 0 -> current cursor position to end of the screen
|
||||
// type: 1 -> current cursor position to beginning of the screen
|
||||
// type: 2 -> clears entire screen
|
||||
// type: 3 -> clears entire screen and also delete scrollback buffer
|
||||
pub fn erase_display(t string) {
|
||||
|
@ -74,8 +74,8 @@ pub fn erase_del_clear()
|
|||
erase_display('3')
|
||||
}
|
||||
|
||||
// type: 0 -> current cursor postion to end of the line
|
||||
// type: 1 -> current cursor postion to beginning of the line
|
||||
// type: 0 -> current cursor position to end of the line
|
||||
// type: 1 -> current cursor position to beginning of the line
|
||||
// type: 2 -> clears entire line
|
||||
// Note: Cursor position does not change
|
||||
pub fn erase_line(t string) {
|
||||
|
|
|
@ -46,7 +46,7 @@ pub fn (app App) post() {
|
|||
|
||||
`$vweb.html()` compiles an HTML template into V during compilation, and embeds the resulting code in current action.
|
||||
|
||||
That means that the template automatically has access to that action's entire environemnt.
|
||||
That means that the template automatically has access to that action's entire environment.
|
||||
|
||||
|
||||
### Deploying vweb apps
|
||||
|
|
Loading…
Reference in New Issue